diff --git a/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java b/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java index a01798ec265..fe454a5fe8b 100644 --- a/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java +++ b/src/main/java/forge/gui/home/settings/CSubmenuPreferences.java @@ -192,19 +192,21 @@ public enum CSubmenuPreferences implements ICSubmenu { view.getLstChooseSkin().ensureIndexIsVisible(view.getLstChooseSkin().getSelectedIndex()); } + @SuppressWarnings("serial") private void updateSkin() { final VSubmenuPreferences view = VSubmenuPreferences.SINGLETON_INSTANCE; - final ForgePreferences prefs = Singletons.getModel().getPreferences(); final String name = view.getLstChooseSkin().getSelectedValue().toString(); - + final ForgePreferences prefs = Singletons.getModel().getPreferences(); if (name.equals(prefs.getPref(FPref.UI_SKIN))) { return; } - RestartUtil.restartApplication(new Runnable() { - @Override - public void run() { - prefs.setPref(FPref.UI_SKIN, name); - prefs.save(); - } - }); + view.getScrChooseSkin().setVisible(false); + view.getLblChooseSkin().setText("Please restart Forge (click here to close)."); + view.getLblChooseSkin().setHoverable(true); + view.getLblChooseSkin().setCommand(new Command() { @Override + public void execute() { RestartUtil.restartApplication(new Runnable() { + @Override public void run() { } }); } }); + + prefs.setPref(FPref.UI_SKIN, name); + prefs.save(); } } diff --git a/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java b/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java index 0f35a7189c6..4d159c6a48a 100644 --- a/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java +++ b/src/main/java/forge/gui/home/settings/VSubmenuPreferences.java @@ -56,6 +56,10 @@ public enum VSubmenuPreferences implements IVSubmenu { .text("Choose Skin").fontScaleAuto(false).fontStyle(Font.BOLD).fontSize(14).build(); private final JList lstChooseSkin = new FList(); + private final FLabel lblChooseSkin = new FLabel.Builder().fontSize(12).fontStyle(Font.ITALIC) + .text("Various user-created themes for Forge backgrounds, fonts, and colors.") + .fontAlign(SwingConstants.LEFT).build(); + private final JScrollPane scrChooseSkin = new FScrollPane(lstChooseSkin); private final JCheckBox cbRemoveSmall = new OptionsCheckBox("Remove Small Creatures"); private final JCheckBox cbSingletons = new OptionsCheckBox("Singleton Mode"); @@ -116,11 +120,8 @@ public enum VSubmenuPreferences implements IVSubmenu { pnlPrefs.add(new SectionLabel("Graphic Options"), sectionConstraints); pnlPrefs.add(lblTitleSkin, regularConstraints); - pnlPrefs.add(new NoteLabel("Various user-created themes for Forge backgrounds, fonts, and colors."), regularConstraints); - pnlPrefs.add(new FScrollPane(lstChooseSkin), "h 120px!, w 150px!, gap 10% 0 0 2%, wrap"); - - pnlPrefs.add(new FLabel.Builder().text("Card Size").fontStyle(Font.BOLD).build(), regularConstraints); - pnlPrefs.add(new NoteLabel("Size of cards in hand and playing field, when possible"), regularConstraints); + pnlPrefs.add(lblChooseSkin, regularConstraints); + pnlPrefs.add(scrChooseSkin, "h 200px!, w 200px!, gap 10% 0 0 2%, wrap"); pnlPrefs.add(cbRandomFoil, regularConstraints); pnlPrefs.add(new NoteLabel("Adds foiled effects to random cards."), regularConstraints); @@ -325,6 +326,16 @@ public enum VSubmenuPreferences implements IVSubmenu { return lstChooseSkin; } + /** @return {@link forge.gui.toolbox.FLabel} */ + public final FLabel getLblChooseSkin() { + return lblChooseSkin; + } + + /** @return {@link javax.swing.JScrollPane} */ + public final JScrollPane getScrChooseSkin() { + return scrChooseSkin; + } + /** @return {@link javax.swing.JCheckBox} */ public final JCheckBox getCbRemoveSmall() { return cbRemoveSmall;