mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Make dialog backdrop appear over top of navigation bar
This commit is contained in:
@@ -24,7 +24,7 @@ Title field and buttons now available on Current Deck pane when on other section
|
|||||||
- More skinned dialogs -
|
- More skinned dialogs -
|
||||||
Most remaining dialogs are now skinned, including all message, confirmation, input, and list choice dialogs
|
Most remaining dialogs are now skinned, including all message, confirmation, input, and list choice dialogs
|
||||||
Reveal-style list dialogs now focus OK button by default and support Escape and Close button without showing a Cancel button
|
Reveal-style list dialogs now focus OK button by default and support Escape and Close button without showing a Cancel button
|
||||||
Increased transparency of backdrop behind dialogs
|
Increased transparency of backdrop behind dialogs and make it appear over navigation bar instead of disabling navigation bar
|
||||||
|
|
||||||
|
|
||||||
- Constructed mode -
|
- Constructed mode -
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ public final class SResizingUtil {
|
|||||||
|
|
||||||
Rectangle mainBounds = frame.getContentPane().getBounds();
|
Rectangle mainBounds = frame.getContentPane().getBounds();
|
||||||
|
|
||||||
|
FDialog.getBackdropPanel().setBounds(mainBounds);
|
||||||
|
|
||||||
int navigationBarHeight = navigationBar.getPreferredSize().height;
|
int navigationBarHeight = navigationBar.getPreferredSize().height;
|
||||||
navigationBar.setSize(mainBounds.width, navigationBarHeight);
|
navigationBar.setSize(mainBounds.width, navigationBarHeight);
|
||||||
navigationBar.validate();
|
navigationBar.validate();
|
||||||
@@ -136,7 +138,6 @@ 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);
|
||||||
FDialog.getBackdropPanel().setBounds(mainBounds);
|
|
||||||
|
|
||||||
pnlInsets.setBounds(mainBounds);
|
pnlInsets.setBounds(mainBounds);
|
||||||
pnlInsets.validate();
|
pnlInsets.validate();
|
||||||
|
|||||||
@@ -60,13 +60,11 @@ import forge.gui.toolbox.FSkin.SkinCursor;
|
|||||||
import forge.model.BuildInfo;
|
import forge.model.BuildInfo;
|
||||||
import forge.properties.NewConstants;
|
import forge.properties.NewConstants;
|
||||||
|
|
||||||
/** */
|
|
||||||
public enum FView {
|
public enum FView {
|
||||||
/** */
|
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
|
||||||
/** */
|
public static final Integer DIALOG_BACKDROP_LAYER = JLayeredPane.MODAL_LAYER - 1;
|
||||||
public static final Integer NAVIGATION_BAR_LAYER = JLayeredPane.MODAL_LAYER - 1;
|
public static final Integer NAVIGATION_BAR_LAYER = DIALOG_BACKDROP_LAYER - 1;
|
||||||
public static final Integer NAVIGATION_BAR_REVEAL_LAYER = NAVIGATION_BAR_LAYER - 1;
|
public static final Integer NAVIGATION_BAR_REVEAL_LAYER = NAVIGATION_BAR_LAYER - 1;
|
||||||
public static final Integer OVERLAY_LAYER = NAVIGATION_BAR_REVEAL_LAYER - 1;
|
public static final Integer OVERLAY_LAYER = NAVIGATION_BAR_REVEAL_LAYER - 1;
|
||||||
public static final Integer TARGETING_LAYER = OVERLAY_LAYER - 1;
|
public static final Integer TARGETING_LAYER = OVERLAY_LAYER - 1;
|
||||||
@@ -120,7 +118,7 @@ public enum FView {
|
|||||||
lpnDocument.add(navigationBar, NAVIGATION_BAR_LAYER);
|
lpnDocument.add(navigationBar, NAVIGATION_BAR_LAYER);
|
||||||
lpnDocument.add(navigationBar.getPnlReveal(), NAVIGATION_BAR_REVEAL_LAYER);
|
lpnDocument.add(navigationBar.getPnlReveal(), NAVIGATION_BAR_REVEAL_LAYER);
|
||||||
lpnDocument.add(FOverlay.SINGLETON_INSTANCE.getPanel(), OVERLAY_LAYER);
|
lpnDocument.add(FOverlay.SINGLETON_INSTANCE.getPanel(), OVERLAY_LAYER);
|
||||||
lpnDocument.add(FDialog.getBackdropPanel(), OVERLAY_LAYER);
|
lpnDocument.add(FDialog.getBackdropPanel(), DIALOG_BACKDROP_LAYER);
|
||||||
// Note: when adding new panels here, keep in mind that the layered pane
|
// Note: when adding new panels here, keep in mind that the layered pane
|
||||||
// has a null layout, so new components will be W0 x H0 pixels - gotcha!
|
// has a null layout, so new components will be W0 x H0 pixels - gotcha!
|
||||||
// FControl has a method called "sizeComponents" which will fix this.
|
// FControl has a method called "sizeComponents" which will fix this.
|
||||||
|
|||||||
Reference in New Issue
Block a user