mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 18:16:31 +03:00
Fix a bug when changing themes (some properties where not updated due to cached properties).
Fix a bug when displaying sub-menus, it was sometimes incorrectly positioned.
This commit is contained in:
@@ -233,9 +233,11 @@ UIMenu* SettingsMenu::createFileTypeMenu( bool emptyMenu ) {
|
||||
mSplitter->getCurEditor()->getSyntaxDefinition().getLanguageName() == name );
|
||||
|
||||
if ( mFileTypeMenues.size() == 1 && menu->getCount() == 1 ) {
|
||||
auto menuBar = mUISceneNode->findByType( UI_TYPE_MENUBAR );
|
||||
menu->reloadStyle( true, true );
|
||||
Float height = menu->getPixelsSize().getHeight();
|
||||
Float tHeight = mUISceneNode->getPixelsSize().getHeight();
|
||||
Float tHeight = mUISceneNode->getPixelsSize().getHeight() -
|
||||
( menuBar ? menuBar->getPixelsSize().getHeight() : 0 );
|
||||
maxItems = (int)eeceil( tHeight / height ) - 2;
|
||||
}
|
||||
|
||||
@@ -276,9 +278,11 @@ UIMenu* SettingsMenu::createColorSchemeMenu( bool emptyMenu ) {
|
||||
mSplitter->getCurrentColorSchemeName() == colorScheme.first );
|
||||
|
||||
if ( mColorSchemeMenues.size() == 1 && menu->getCount() == 1 ) {
|
||||
auto menuBar = mUISceneNode->findByType( UI_TYPE_MENUBAR );
|
||||
menu->reloadStyle( true, true );
|
||||
Float height = menu->getPixelsSize().getHeight();
|
||||
Float tHeight = mUISceneNode->getPixelsSize().getHeight();
|
||||
Float tHeight = mUISceneNode->getPixelsSize().getHeight() -
|
||||
( menuBar ? menuBar->getPixelsSize().getHeight() : 0 );
|
||||
maxItems = (int)eeceil( tHeight / height ) - 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user