GUI, preferences: added theme switch without app restart (for preview only, app must be restarted anyway for full GUI refresh);

This commit is contained in:
Oleg Agafonov 2024-07-03 04:31:07 +04:00
parent e3dee4eac1
commit 64f3df035b
10 changed files with 234 additions and 135 deletions

View file

@ -6142,8 +6142,8 @@
<Container class="javax.swing.JPanel" name="tabThemes">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Themes">
<Property name="tabTitle" type="java.lang.String" value="Themes"/>
<JTabbedPaneConstraints tabName="GUI theme">
<Property name="tabTitle" type="java.lang.String" value="GUI theme"/>
</JTabbedPaneConstraints>
</Constraint>
</Constraints>
@ -6151,25 +6151,19 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="807" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="themesCategory" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="themesCategory" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="556" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
<Component id="themesCategory" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="460" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="themesCategory" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -6194,25 +6188,25 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="lbSelectLabel" min="-2" pref="96" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="lbThemeHint" min="-2" max="-2" attributes="0"/>
<Component id="cbTheme" min="-2" pref="303" max="-2" attributes="0"/>
<Component id="cbTheme" min="-2" pref="313" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="360" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="cbTheme" min="-2" max="-2" attributes="0"/>
<Component id="lbSelectLabel" min="-2" pref="22" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="lbThemeHint" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -6221,7 +6215,7 @@
<Component class="javax.swing.JLabel" name="lbSelectLabel">
<Properties>
<Property name="horizontalAlignment" type="int" value="2"/>
<Property name="text" type="java.lang.String" value="Select a theme:"/>
<Property name="text" type="java.lang.String" value="Color style:"/>
<Property name="toolTipText" type="java.lang.String" value=""/>
<Property name="horizontalTextPosition" type="int" value="10"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
@ -6231,13 +6225,16 @@
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="cbTheme">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbThemeActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;ThemeType&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JLabel" name="lbThemeHint">
<Properties>
<Property name="text" type="java.lang.String" value="Requires a restart to apply new theme."/>
<Property name="text" type="java.lang.String" value="WARNING, some color settings will be applied after app RESTART"/>
</Properties>
</Component>
</SubComponents>