Added option to hide decorations with ui.hide_decorations

This commit is contained in:
phildin
2015-04-09 17:50:57 +01:00
parent 2225ae6e97
commit 3c32a119e8
3 changed files with 8 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
/target/
@@ -170,6 +170,9 @@ public class Application
/** The path (relative to the appdir) to a single play again image. */
public String playAgainImage;
public boolean hideDecorations;
/** The global percentages for each step. A step may have more than one, and
* the lowest reasonable one is used if a step is revisited. */
public Map<Step, List<Integer>> stepPercentages =
@@ -725,6 +728,8 @@ public class Application
ui.playAgain = parseRect(cdata, "ui.play_again", ui.playAgain);
ui.playAgainImage = (String)cdata.get("ui.play_again_image");
ui.hideDecorations = Boolean.parseBoolean((String)cdata.get("ui.hide_decorations"));
// step progress percentages
for (UpdateInterface.Step step : UpdateInterface.Step.values()) {
String spec = (String)cdata.get("ui.percents." + step.name());
@@ -99,6 +99,8 @@ public class GetdownApp
String title = StringUtil.isBlank(_ifc.name) ? "" : _ifc.name;
if (_frame == null) {
_frame = new JFrame(title);
_frame.setUndecorated(_ifc.hideDecorations);
_frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing (WindowEvent evt) {