Implement UI scaling for various components and add UIScaler utility class

This commit is contained in:
extio-de
2025-08-23 10:40:21 +02:00
parent 8b2d39913d
commit 1425e9b9d6
7 changed files with 315 additions and 13 deletions

View File

@@ -53,9 +53,9 @@ public class ModelPropertiesDialog extends JDialog {
this.setModal(true);
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
this.setBounds(100, 100, 678, 191);
this.setBounds(UIScaler.scale(100), UIScaler.scale(100), UIScaler.scale(678), UIScaler.scale(191));
this.getContentPane().setLayout(new BorderLayout());
this.contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
this.contentPanel.setBorder(new EmptyBorder(UIScaler.scale(5), UIScaler.scale(5), UIScaler.scale(5), UIScaler.scale(5)));
this.getContentPane().add(this.contentPanel, BorderLayout.CENTER);
this.contentPanel.setLayout(new GridLayout(0, 2, 0, 0));
{
@@ -150,6 +150,9 @@ public class ModelPropertiesDialog extends JDialog {
this.textField_3.setText(String.valueOf(editModel.contextSize()));
this.txtPrompttemplate.setText(editModel.promptTemplate());
}
// Apply font scaling to all components
UIScaler.scaleComponentFonts(this);
}
}
}