Browse Source

REPORT-134742 fix: 使用缩放工具类

fbp/release
lemon 2 months ago
parent
commit
80c0e44cdc
  1. 3
      designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java
  2. 2
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java

3
designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java

@ -12,6 +12,7 @@ import java.awt.Toolkit;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import static com.fine.theme.utils.FineUIScale.createScaleDimension;
import static com.fine.theme.utils.FineUIScale.scale;
/**
@ -99,7 +100,7 @@ public class CalendarNumberField extends UINumberField {
}
public Dimension getPreferredSize() {
return scale(new Dimension(24, 24));
return createScaleDimension(24, 24);
}
public boolean shouldResponseChangeListener() {

2
designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java

@ -235,7 +235,7 @@ public class UICalendarPanel extends JPanel {
}
});
sPane.add(row(12, cell(timeLabel), cell(hms), flex(), cell(okButton)).getComponent());
sPane.add(row(cell(timeLabel).weight(36), cell(hms).weight(180), flex(), cell(okButton).weight(48)).getComponent());
sPane.setBorder(new ScaledEmptyBorder(10, 12, 10, 12));
return sPane;
}

Loading…
Cancel
Save