| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -65,6 +65,7 @@ public class DefaultPlatform { | |||
| 65 | 65 | "CheckBox", | |
| 66 | 66 | "CheckBoxMenuItem", | |
| 67 | 67 | "ComboBox", | |
| 68 | + "Label", | ||
| 68 | 69 | "List", | |
| 69 | 70 | "Menu", | |
| 70 | 71 | "MenuBar", | |
@@ -80,6 +81,7 @@ public class DefaultPlatform { | |||
| 80 | 81 | "Table", | |
| 81 | 82 | "TableHeader", | |
| 82 | 83 | "TextArea", | |
| 84 | + "TextField", | ||
| 83 | 85 | "TextPane", | |
| 84 | 86 | "TitledBorder", | |
| 85 | 87 | "ToggleButton", | |
@@ -115,14 +117,11 @@ public void setLookAndFeel() throws Exception { | |||
| 115 | 117 | ||
| 116 | 118 | // dummy font call so that it's registered for FlatLaf | |
| 117 | 119 | Font defaultFont = Toolkit.getSansFont(14, Font.PLAIN); | |
| 120 | + UIManager.put("defaultFont", defaultFont); | ||
| 118 | 121 | ||
| 119 | 122 | // pull in FlatLaf.properties from the processing.app.laf folder | |
| 120 | 123 | FlatLaf.registerCustomDefaultsSource("processing.app.laf"); | |
| 121 | 124 | ||
| 122 | - // defaultFont = 14 "Processing Sans", "Open Sans", "Noto Sans", Roboto, Arial | ||
| 123 | - //UIManager.put("defaultFont", "14 \"Processing Sans\", \"Open Sans\", \"Noto Sans\", Roboto, Arial"); | ||
| 124 | - UIManager.put("defaultFont", defaultFont); | ||
| 125 | - | ||
| 126 | 125 | // start with Light, but updateTheme() will be called soon | |
| 127 | 126 | UIManager.setLookAndFeel(new FlatLightLaf()); | |
| 128 | 127 | ||
@@ -133,6 +132,7 @@ public void setLookAndFeel() throws Exception { | |||
| 133 | 132 | } | |
| 134 | 133 | */ | |
| 135 | 134 | ||
| 135 | + /* | ||
| 136 | 136 | // If the default has been overridden in the preferences, set the font | |
| 137 | 137 | String fontName = Preferences.get("ui.font.family"); | |
| 138 | 138 | int fontSize = Preferences.getInteger("ui.font.size"); | |
@@ -148,6 +148,7 @@ public void setLookAndFeel() throws Exception { | |||
| 148 | 148 | // Font font = new Font(fontName, Font.PLAIN, fontSize).deriveFont(attributes); | |
| 149 | 149 | // setUIFont(new FontUIResource(font)); | |
| 150 | 150 | } | |
| 151 | + */ | ||
| 151 | 152 | } | |
| 152 | 153 | ||
| 153 | 154 | // // Adapted from https://stackoverflow.com/a/64667581/18247494 | |
@@ -161,6 +162,7 @@ public void setLookAndFeel() throws Exception { | |||
| 161 | 162 | // } | |
| 162 | 163 | // } | |
| 163 | 164 | ||
| 165 | + /* | ||
| 164 | 166 | // Rewritten from https://stackoverflow.com/a/7434935 | |
| 165 | 167 | static private void setUIFont(FontUIResource f) { | |
| 166 | 168 | for (Object key : UIManager.getLookAndFeelDefaults().keySet()) { | |
@@ -170,6 +172,7 @@ static private void setUIFont(FontUIResource f) { | |||
| 170 | 172 | } | |
| 171 | 173 | } | |
| 172 | 174 | } | |
| 175 | + */ | ||
| 173 | 176 | ||
| 174 | 177 | ||
| 175 | 178 | public void setInterfaceZoom() throws Exception { | |
@@ -179,11 +182,14 @@ public void setInterfaceZoom() throws Exception { | |||
| 179 | 182 | scaleDefaultFont(widgetName); | |
| 180 | 183 | } | |
| 181 | 184 | ||
| 182 | - String fontName = Preferences.get("ui.font.family"); | ||
| 183 | - int fontSize = Preferences.getInteger("ui.font.size"); | ||
| 184 | - FontUIResource uiFont = new FontUIResource(fontName, Font.PLAIN, Toolkit.zoom(fontSize)); | ||
| 185 | - UIManager.put("Label.font", uiFont); | ||
| 186 | - UIManager.put("TextField.font", uiFont); | ||
| 185 | + // Font defaultFont = Toolkit.getSansFont(14, Font.PLAIN); | ||
| 186 | + // UIManager.put("defaultFont", defaultFont); | ||
| 187 | + | ||
| 188 | + // String fontName = Preferences.get("ui.font.family"); | ||
| 189 | + // int fontSize = Preferences.getInteger("ui.font.size"); | ||
| 190 | + // FontUIResource uiFont = new FontUIResource(fontName, Font.PLAIN, Toolkit.zoom(fontSize)); | ||
| 191 | + // UIManager.put("Label.font", uiFont); | ||
| 192 | + // UIManager.put("TextField.font", uiFont); | ||
| 187 | 193 | } | |
| 188 | 194 | } | |
| 189 | 195 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -95,9 +95,9 @@ platform.auto_file_type_associations = true | |||
| 95 | 95 | ||
| 96 | 96 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 97 | 97 | ||
| 98 | - # default font used for UI elements | ||
| 99 | - ui.font.family = Dialog | ||
| 100 | - ui.font.size = 12 | ||
| 98 | + # default font used for UI elements (no longer in use as of beta 9) | ||
| 99 | + #ui.font.family = Dialog | ||
| 100 | + #ui.font.size = 12 | ||
| 101 | 101 | ||
| 102 | 102 | # default size for the main window | |
| 103 | 103 | editor.window.width.default = 700 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments