diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java index a1eadbe8fa..2f97feeafc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java @@ -1,6 +1,7 @@ package com.fr.design.gui.frpane; import com.fine.swing.ui.layout.Layouts; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.beans.BasicBeanPane; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; @@ -12,11 +13,14 @@ import java.awt.BorderLayout; import java.awt.Dimension; import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.fix; import static com.fine.swing.ui.layout.Layouts.flex; public class UINumberDragPane extends BasicBeanPane implements GlobalNameObserver { private static final long serialVersionUID = -8681716725163358249L; + private static double DRAG_BAR_WEIGHT = 0.64; + private static double SPINNER_WIGHT = 0.36; private UISlider dragBar; private UISpinner spinner; private boolean isEditing = false; @@ -40,11 +44,12 @@ public class UINumberDragPane extends BasicBeanPane implements GlobalNam dragBar.setPaintLabels(true); dragBar.setMajorTickSpacing(minValue < 0 ? (int) maxValue : (int) maxValue - (int) minValue); spinner = createUISpinner(minValue, maxValue, dierta); + spinner.getTextField().setBorder(new ScaledEmptyBorder(0, 0, 0, 0)); spinner.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation")); spinner.setValue(dragBar.getValue()); this.setLayout(new BorderLayout()); this.add(Layouts.row( - cell(dragBar).weight(0.7), flex(0.1), cell(spinner).weight(0.7) + cell(dragBar).weight(DRAG_BAR_WEIGHT), fix(2), cell(spinner).weight(SPINNER_WIGHT) ).getComponent()); dragBar.addChangeListener(e -> { if (globalNameListener != null && shouldResponseNameListener()) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java index 8acebe91cd..3346ab92cd 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java @@ -361,7 +361,11 @@ public abstract class TemplateThemeEditorPane extends J } protected void buildTabPane() { - uiTabbedPane = tabPaneBuilder.withHeadRatio(0.6f).build(); + if (WidgetThemeDesignerUtils.enableWidgetEnhance()) { + uiTabbedPane = tabPaneBuilder.withHeadRatio(1.0f).build(); + } else { + uiTabbedPane = tabPaneBuilder.withHeadRatio(0.6f).build(); + } uiTabbedPane.setBorder(new ScaledEmptyBorder(10, 5, 10, 1)); } } \ No newline at end of file