mirror of
https://github.com/cyanfish/naps2.git
synced 2024-10-05 03:47:10 +03:00
Changed localization logic to use ToolStripItem for more generality with the new usage of dropdowns.
This commit is contained in:
parent
21329e3716
commit
43007c6f02
@ -107,7 +107,7 @@ namespace NAPS2.WinForms
|
||||
private void RelayoutToolbar()
|
||||
{
|
||||
// Wrap text as necessary
|
||||
foreach (var btn in tStrip.Items.OfType<ToolStripButton>())
|
||||
foreach (var btn in tStrip.Items.OfType<ToolStripItem>())
|
||||
{
|
||||
btn.Text = stringWrapper.Wrap(btn.Text, 80, CreateGraphics(), btn.Font);
|
||||
}
|
||||
@ -116,7 +116,7 @@ namespace NAPS2.WinForms
|
||||
// Recalculate visibility for the below check
|
||||
Application.DoEvents();
|
||||
// Check if toolbar buttons are overflowing
|
||||
if (tStrip.Items.OfType<ToolStripButton>().Any(btn => !btn.Visible))
|
||||
if (tStrip.Items.OfType<ToolStripItem>().Any(btn => !btn.Visible))
|
||||
{
|
||||
// Shrink the padding to help the buttons fit
|
||||
SetToolbarButtonPadding(new Padding(5, 0, 5, 0));
|
||||
@ -125,7 +125,7 @@ namespace NAPS2.WinForms
|
||||
|
||||
private void SetToolbarButtonPadding(Padding padding)
|
||||
{
|
||||
foreach (var btn in tStrip.Items.OfType<ToolStripButton>())
|
||||
foreach (var btn in tStrip.Items.OfType<ToolStripItem>())
|
||||
{
|
||||
btn.Padding = padding;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user