mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
If titlebar unlocked or window made full-screen, delay hiding titlebar until mouse moves away
This commit is contained in:
@@ -131,14 +131,17 @@ public final class SResizingUtil {
|
||||
FAbsolutePositioner.SINGLETON_INSTANCE.containerResized(mainBounds);
|
||||
FOverlay.SINGLETON_INSTANCE.getPanel().setBounds(mainBounds);
|
||||
FNetOverlay.SINGLETON_INSTANCE.containerResized(mainBounds);
|
||||
|
||||
final ForgePreferences prefs = Singletons.getModel().getPreferences();
|
||||
final int navigationBarHeight = frame.isTitleBarHidden() ? 0 : navigationBar.getPreferredSize().height;
|
||||
final int statusBarHeight = prefs.getPrefBoolean(FPref.UI_HIDE_STATUS_BAR) ? 0 : statusBar.getPreferredSize().height;
|
||||
|
||||
|
||||
int navigationBarHeight = navigationBar.getPreferredSize().height;
|
||||
navigationBar.setBounds(mainBounds.x, mainBounds.y, mainBounds.width, navigationBarHeight);
|
||||
navigationBar.validate();
|
||||
|
||||
|
||||
if (frame.isTitleBarHidden()) {
|
||||
navigationBarHeight = 0; //use 0 for remaining calculations if title bar hidden
|
||||
}
|
||||
final ForgePreferences prefs = Singletons.getModel().getPreferences();
|
||||
final int statusBarHeight = prefs.getPrefBoolean(FPref.UI_HIDE_STATUS_BAR) ? 0 : statusBar.getPreferredSize().height;
|
||||
|
||||
pnlInsets.setBounds(mainBounds.x, mainBounds.y + navigationBarHeight, mainBounds.width, mainBounds.height - navigationBarHeight - statusBarHeight);
|
||||
pnlInsets.validate();
|
||||
|
||||
|
||||
@@ -194,7 +194,12 @@ public class FNavigationBar extends FTitleBarBase {
|
||||
checkForRevealChangeTimer.stop();
|
||||
pnlReveal.setVisible(hidden);
|
||||
}
|
||||
super.setVisible(visible);
|
||||
if (visible || this.getHeight() < visibleHeight) {
|
||||
super.setVisible(visible);
|
||||
}
|
||||
else if (pnlReveal != null) { //if previously fully visible, delay hiding titlebar until mouse moves away
|
||||
checkForRevealChangeTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user