mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38: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);
|
FAbsolutePositioner.SINGLETON_INSTANCE.containerResized(mainBounds);
|
||||||
FOverlay.SINGLETON_INSTANCE.getPanel().setBounds(mainBounds);
|
FOverlay.SINGLETON_INSTANCE.getPanel().setBounds(mainBounds);
|
||||||
FNetOverlay.SINGLETON_INSTANCE.containerResized(mainBounds);
|
FNetOverlay.SINGLETON_INSTANCE.containerResized(mainBounds);
|
||||||
|
|
||||||
final ForgePreferences prefs = Singletons.getModel().getPreferences();
|
int navigationBarHeight = navigationBar.getPreferredSize().height;
|
||||||
final int navigationBarHeight = frame.isTitleBarHidden() ? 0 : navigationBar.getPreferredSize().height;
|
|
||||||
final int statusBarHeight = prefs.getPrefBoolean(FPref.UI_HIDE_STATUS_BAR) ? 0 : statusBar.getPreferredSize().height;
|
|
||||||
|
|
||||||
navigationBar.setBounds(mainBounds.x, mainBounds.y, mainBounds.width, navigationBarHeight);
|
navigationBar.setBounds(mainBounds.x, mainBounds.y, mainBounds.width, navigationBarHeight);
|
||||||
navigationBar.validate();
|
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.setBounds(mainBounds.x, mainBounds.y + navigationBarHeight, mainBounds.width, mainBounds.height - navigationBarHeight - statusBarHeight);
|
||||||
pnlInsets.validate();
|
pnlInsets.validate();
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,12 @@ public class FNavigationBar extends FTitleBarBase {
|
|||||||
checkForRevealChangeTimer.stop();
|
checkForRevealChangeTimer.stop();
|
||||||
pnlReveal.setVisible(hidden);
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user