Skip to content

Commit 4a2b560

Browse files
author
IMS212
committed
Beta 2, centered
1 parent 831c1d5 commit 4a2b560

2 files changed

Lines changed: 119 additions & 57 deletions

File tree

src/main/java/net/hypercubemc/iris_installer/NewInstaller.form

Lines changed: 64 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,72 @@
2929
<DimensionLayout dim="0">
3030
<Group type="103" groupAlignment="0" attributes="0">
3131
<Group type="102" alignment="1" attributes="0">
32-
<EmptySpace pref="196" max="32767" attributes="0"/>
33-
<Component id="irisInstallerLabel" min="-2" max="-2" attributes="0"/>
34-
<EmptySpace min="-2" pref="196" max="-2" attributes="0"/>
32+
<EmptySpace max="32767" attributes="0"/>
33+
<Group type="103" groupAlignment="0" attributes="0">
34+
<Group type="102" alignment="1" attributes="0">
35+
<Component id="outdatedText2" min="-2" max="-2" attributes="0"/>
36+
<EmptySpace min="-2" pref="46" max="-2" attributes="0"/>
37+
</Group>
38+
<Group type="102" alignment="1" attributes="0">
39+
<Group type="103" groupAlignment="1" attributes="0">
40+
<Component id="directoryName" min="-2" pref="302" max="-2" attributes="0"/>
41+
<Group type="102" attributes="0">
42+
<Component id="standaloneType" min="-2" max="-2" attributes="0"/>
43+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
44+
<Component id="fabricType" min="-2" max="-2" attributes="0"/>
45+
</Group>
46+
</Group>
47+
<EmptySpace min="-2" pref="105" max="-2" attributes="0"/>
48+
</Group>
49+
</Group>
3550
</Group>
3651
<Group type="102" attributes="0">
37-
<EmptySpace min="19" pref="19" max="-2" attributes="0"/>
3852
<Group type="103" groupAlignment="0" attributes="0">
39-
<Group type="102" alignment="1" attributes="0">
40-
<Component id="progressBar" max="32767" attributes="0"/>
53+
<Group type="102" alignment="0" attributes="0">
54+
<EmptySpace min="0" pref="21" max="32767" attributes="0"/>
55+
<Component id="progressBar" min="-2" pref="274" max="-2" attributes="0"/>
4156
<EmptySpace type="separate" max="-2" attributes="0"/>
4257
<Component id="installButton" min="-2" pref="171" max="-2" attributes="0"/>
43-
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
4458
</Group>
4559
<Group type="102" attributes="0">
4660
<Group type="103" groupAlignment="0" attributes="0">
47-
<Component id="installationType" min="-2" max="-2" attributes="0"/>
48-
<Component id="betaSelection" min="-2" max="-2" attributes="0"/>
49-
<Component id="outdatedText2" min="-2" max="-2" attributes="0"/>
50-
<Component id="outdatedText1" min="-2" max="-2" attributes="0"/>
51-
<Component id="gameVersionLabel" min="-2" pref="227" max="-2" attributes="0"/>
52-
<Component id="gameVersionList" min="-2" pref="183" max="-2" attributes="0"/>
5361
<Group type="102" alignment="0" attributes="0">
54-
<Component id="standaloneType" min="-2" max="-2" attributes="0"/>
55-
<EmptySpace type="unrelated" max="-2" attributes="0"/>
56-
<Component id="fabricType" min="-2" max="-2" attributes="0"/>
62+
<EmptySpace min="-2" pref="132" max="-2" attributes="0"/>
63+
<Component id="installationDirectory" min="-2" max="-2" attributes="0"/>
64+
</Group>
65+
<Group type="102" alignment="0" attributes="0">
66+
<EmptySpace min="-2" pref="91" max="-2" attributes="0"/>
67+
<Group type="103" groupAlignment="0" attributes="0">
68+
<Component id="betaSelection" min="-2" max="-2" attributes="0"/>
69+
<Component id="irisInstallerLabel" min="-2" max="-2" attributes="0"/>
70+
</Group>
71+
</Group>
72+
<Group type="102" alignment="0" attributes="0">
73+
<EmptySpace min="-2" pref="60" max="-2" attributes="0"/>
74+
<Component id="outdatedText1" min="-2" max="-2" attributes="0"/>
5775
</Group>
58-
<Component id="installationDirectory" alignment="0" min="-2" max="-2" attributes="0"/>
59-
<Component id="directoryName" alignment="0" min="-2" pref="302" max="-2" attributes="0"/>
6076
</Group>
61-
<EmptySpace max="32767" attributes="0"/>
77+
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
78+
</Group>
79+
</Group>
80+
<EmptySpace max="-2" attributes="0"/>
81+
</Group>
82+
<Group type="102" attributes="0">
83+
<Group type="103" groupAlignment="0" attributes="0">
84+
<Group type="102" alignment="0" attributes="0">
85+
<EmptySpace min="-2" pref="167" max="-2" attributes="0"/>
86+
<Component id="installationType" min="-2" max="-2" attributes="0"/>
87+
</Group>
88+
<Group type="102" alignment="0" attributes="0">
89+
<EmptySpace min="-2" pref="125" max="-2" attributes="0"/>
90+
<Component id="gameVersionLabel" min="-2" pref="227" max="-2" attributes="0"/>
91+
</Group>
92+
<Group type="102" alignment="0" attributes="0">
93+
<EmptySpace min="-2" pref="149" max="-2" attributes="0"/>
94+
<Component id="gameVersionList" min="-2" pref="183" max="-2" attributes="0"/>
6295
</Group>
6396
</Group>
97+
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
6498
</Group>
6599
</Group>
66100
</DimensionLayout>
@@ -69,28 +103,28 @@
69103
<Group type="102" alignment="0" attributes="0">
70104
<EmptySpace min="-2" pref="48" max="-2" attributes="0"/>
71105
<Component id="irisInstallerLabel" pref="75" max="32767" attributes="0"/>
72-
<EmptySpace type="separate" max="-2" attributes="0"/>
106+
<EmptySpace max="-2" attributes="0"/>
73107
<Component id="gameVersionLabel" min="-2" pref="35" max="-2" attributes="0"/>
74-
<EmptySpace min="-2" max="-2" attributes="0"/>
108+
<EmptySpace max="-2" attributes="0"/>
75109
<Component id="gameVersionList" min="-2" pref="43" max="-2" attributes="0"/>
76-
<EmptySpace min="-2" max="-2" attributes="0"/>
110+
<EmptySpace type="separate" max="-2" attributes="0"/>
77111
<Component id="betaSelection" min="-2" max="-2" attributes="0"/>
78-
<EmptySpace min="-2" max="-2" attributes="0"/>
112+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
79113
<Component id="outdatedText1" min="-2" pref="23" max="-2" attributes="0"/>
80-
<EmptySpace min="-2" max="-2" attributes="0"/>
114+
<EmptySpace max="-2" attributes="0"/>
81115
<Component id="outdatedText2" min="-2" max="-2" attributes="0"/>
82-
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
116+
<EmptySpace max="-2" attributes="0"/>
83117
<Component id="installationType" min="-2" max="-2" attributes="0"/>
84-
<EmptySpace min="-2" max="-2" attributes="0"/>
118+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
85119
<Group type="103" groupAlignment="3" attributes="0">
86120
<Component id="standaloneType" alignment="3" min="-2" max="-2" attributes="0"/>
87121
<Component id="fabricType" alignment="3" min="-2" max="-2" attributes="0"/>
88122
</Group>
89-
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
123+
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
90124
<Component id="installationDirectory" min="-2" max="-2" attributes="0"/>
91-
<EmptySpace min="-2" max="-2" attributes="0"/>
125+
<EmptySpace max="-2" attributes="0"/>
92126
<Component id="directoryName" min="-2" pref="36" max="-2" attributes="0"/>
93-
<EmptySpace min="-2" pref="91" max="-2" attributes="0"/>
127+
<EmptySpace min="-2" pref="97" max="-2" attributes="0"/>
94128
<Group type="103" groupAlignment="0" attributes="0">
95129
<Group type="102" alignment="1" attributes="0">
96130
<Component id="installButton" min="-2" pref="56" max="-2" attributes="0"/>
@@ -150,6 +184,7 @@
150184
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
151185
<Font name="sansserif" size="18" style="0"/>
152186
</Property>
187+
<Property name="horizontalAlignment" type="int" value="0"/>
153188
<Property name="text" type="java.lang.String" value="Select game version:"/>
154189
</Properties>
155190
</Component>

src/main/java/net/hypercubemc/iris_installer/NewInstaller.java

Lines changed: 55 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ public NewInstaller() {
9696

9797
initComponents();
9898

99+
if (!dark) {
100+
outdatedText1.setForeground(new Color(154, 136, 63, 255));
101+
outdatedText2.setForeground(new Color(154, 136, 63, 255));
102+
}
103+
99104
if (!INSTALLER_META.hasBeta()) {
100105
betaSelection.setVisible(false);
101106
}
@@ -371,6 +376,7 @@ private void initComponents() {
371376
gameVersionList.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1.19", "1.18.2", "1.17.1", "1.16.5" }));
372377

373378
gameVersionLabel.setFont(new java.awt.Font("sansserif", 0, 18)); // NOI18N
379+
gameVersionLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
374380
gameVersionLabel.setText("Select game version:");
375381

376382
outdatedText1.setFont(new java.awt.Font("sansserif", 0, 16)); // NOI18N
@@ -405,59 +411,80 @@ private void initComponents() {
405411
layout.setHorizontalGroup(
406412
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
407413
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
408-
.addContainerGap(196, Short.MAX_VALUE)
409-
.addComponent(irisInstallerLabel)
410-
.addGap(196, 196, 196))
411-
.addGroup(layout.createSequentialGroup()
412-
.addGap(19, 19, 19)
414+
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
413415
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
414416
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
415-
.addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
417+
.addComponent(outdatedText2)
418+
.addGap(46, 46, 46))
419+
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
420+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
421+
.addComponent(directoryName, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE)
422+
.addGroup(layout.createSequentialGroup()
423+
.addComponent(standaloneType)
424+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
425+
.addComponent(fabricType)))
426+
.addGap(105, 105, 105))))
427+
.addGroup(layout.createSequentialGroup()
428+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
429+
.addGroup(layout.createSequentialGroup()
430+
.addGap(0, 21, Short.MAX_VALUE)
431+
.addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)
416432
.addGap(18, 18, 18)
417-
.addComponent(installButton, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
418-
.addGap(26, 26, 26))
433+
.addComponent(installButton, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE))
419434
.addGroup(layout.createSequentialGroup()
420435
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
421-
.addComponent(installationType)
422-
.addComponent(betaSelection)
423-
.addComponent(outdatedText2)
424-
.addComponent(outdatedText1)
425-
.addComponent(gameVersionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)
426-
.addComponent(gameVersionList, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
427436
.addGroup(layout.createSequentialGroup()
428-
.addComponent(standaloneType)
429-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
430-
.addComponent(fabricType))
431-
.addComponent(installationDirectory)
432-
.addComponent(directoryName, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE))
433-
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
437+
.addGap(132, 132, 132)
438+
.addComponent(installationDirectory))
439+
.addGroup(layout.createSequentialGroup()
440+
.addGap(91, 91, 91)
441+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
442+
.addComponent(betaSelection)
443+
.addComponent(irisInstallerLabel)))
444+
.addGroup(layout.createSequentialGroup()
445+
.addGap(60, 60, 60)
446+
.addComponent(outdatedText1)))
447+
.addGap(0, 0, Short.MAX_VALUE)))
448+
.addContainerGap())
449+
.addGroup(layout.createSequentialGroup()
450+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
451+
.addGroup(layout.createSequentialGroup()
452+
.addGap(167, 167, 167)
453+
.addComponent(installationType))
454+
.addGroup(layout.createSequentialGroup()
455+
.addGap(125, 125, 125)
456+
.addComponent(gameVersionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE))
457+
.addGroup(layout.createSequentialGroup()
458+
.addGap(149, 149, 149)
459+
.addComponent(gameVersionList, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)))
460+
.addGap(0, 0, Short.MAX_VALUE))
434461
);
435462
layout.setVerticalGroup(
436463
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
437464
.addGroup(layout.createSequentialGroup()
438465
.addGap(48, 48, 48)
439466
.addComponent(irisInstallerLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
440-
.addGap(18, 18, 18)
467+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
441468
.addComponent(gameVersionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
442469
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
443470
.addComponent(gameVersionList, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
444-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
471+
.addGap(18, 18, 18)
445472
.addComponent(betaSelection)
446-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
473+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
447474
.addComponent(outdatedText1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
448475
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
449476
.addComponent(outdatedText2)
450-
.addGap(18, 18, 18)
451-
.addComponent(installationType)
452477
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
478+
.addComponent(installationType)
479+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
453480
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
454481
.addComponent(standaloneType)
455482
.addComponent(fabricType))
456-
.addGap(18, 18, 18)
483+
.addGap(12, 12, 12)
457484
.addComponent(installationDirectory)
458485
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
459486
.addComponent(directoryName, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
460-
.addGap(91, 91, 91)
487+
.addGap(97, 97, 97)
461488
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
462489
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
463490
.addComponent(installButton, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -474,7 +501,7 @@ private void initComponents() {
474501
* @param args the command line arguments
475502
*/
476503
public static void main(String[] args) {
477-
dark = true;
504+
dark = DarkModeDetector.isDarkMode();
478505
System.setProperty("apple.awt.application.appearance", "system");
479506
if (dark) {
480507
FlatDarkLaf.setup();

0 commit comments

Comments
 (0)