Skip to content

Commit

Permalink
Code simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
jackburton79 committed Dec 6, 2024
1 parent 8733d08 commit 1c7f9c7
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/ui/GenioWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4530,17 +4530,16 @@ GenioWindow::_HandleConfigurationChanged(BMessage* message)
} else if (key.Compare("show_statusbar") == 0) {
_ShowView(fStatusView, bool(gCFG["show_statusbar"]), MSG_TOGGLE_STATUSBAR);
} else if (key.Compare("use_small_icons") == 0) {
if (gCFG["use_small_icons"]) {
fToolBar->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSizeSmall).Width());
fFindGroup->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSizeSmall).Width());
fReplaceGroup->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSizeSmall).Width());
fRunGroup->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSizeSmall).Width());
} else {
fToolBar->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSize).Width());
fFindGroup->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSize).Width());
fReplaceGroup->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSize).Width());
fRunGroup->ChangeIconSize(be_control_look->ComposeIconSize(kDefaultIconSize).Width());
}
float iconSize = 0;
if (message->GetBool("value", false))
iconSize = be_control_look->ComposeIconSize(kDefaultIconSizeSmall).Width();
else
iconSize = be_control_look->ComposeIconSize(kDefaultIconSize).Width();

fToolBar->ChangeIconSize(iconSize);
fFindGroup->ChangeIconSize(iconSize);
fReplaceGroup->ChangeIconSize(iconSize);
fRunGroup->ChangeIconSize(iconSize);
}

Editor* selected = fTabManager->SelectedEditor();
Expand Down

0 comments on commit 1c7f9c7

Please sign in to comment.