Skip to content

Commit

Permalink
Tweaks related to FlatLAF on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
litan committed Sep 23, 2021
1 parent eae91ae commit 11f8c79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 43 deletions.
45 changes: 4 additions & 41 deletions src/main/scala/net/kogics/kojo/lite/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,20 @@ object Main extends AppMenu with ScriptLoader { main =>
}
})

if (System.getProperty("os.name") != "Linux") {
frame.pack()
if (!Utils.isLinux) {
val screenSize = Toolkit.getDefaultToolkit.getScreenSize
// The following triggers the menu offset bug on Gnome 3
frame.setBounds(50, 50, screenSize.width - 100, screenSize.height - 100)
}
frame.setExtendedState(Frame.MAXIMIZED_BOTH)
frame.pack()

frame.setVisible(true)

if (!kojoCtx.subKojo && args.length == 1) {
loadAndRunUrl(args(0), true)
}
else {
frame.toFront()
Utils.schedule(1) { scriptEditorH.activate() }
Utils.schedule(2) { scriptEditorH.activate() }
}
Expand Down Expand Up @@ -228,44 +228,7 @@ object Main extends AppMenu with ScriptLoader { main =>
}

private def updateDefaultFonts(size: Int): Unit = {
// val plain = new Font("SansSerif", 0, size)
// UIManager.put("ColorChooser.font", plain)
// UIManager.put("FileChooser.font", plain)
// UIManager.put("Panel.font", plain)
// UIManager.put("TextPane.font", plain)
// UIManager.put("OptionPane.font", plain)
// UIManager.put("OptionPane.messageFont", plain)
// UIManager.put("OptionPane.buttonFont", plain)
// UIManager.put("EditorPane.font", plain)
// UIManager.put("ScrollPane.font", plain)
// UIManager.put("TabbedPane.font", plain)
// UIManager.put("ToolBar.font", plain)
// UIManager.put("ProgressBar.font", plain)
// UIManager.put("Viewport.font", plain)
// UIManager.put("TitledBorder.font", plain)
// UIManager.put("Button.font", plain)
// UIManager.put("RadioButton.font", plain)
// UIManager.put("ToggleButton.font", plain)
// UIManager.put("ComboBox.font", plain)
// UIManager.put("CheckBox.font", plain)
// UIManager.put("Menu.font", plain)
// UIManager.put("Menu.acceleratorFont", plain)
// UIManager.put("PopupMenu.font", plain)
// UIManager.put("MenuBar.font", plain)
// UIManager.put("MenuItem.font", plain)
// UIManager.put("MenuItem.acceleratorFont", plain)
// UIManager.put("CheckBoxMenuItem.font", plain)
// UIManager.put("RadioButtonMenuItem.font", plain)
// UIManager.put("Label.font", plain)
// UIManager.put("Table.font", plain)
// UIManager.put("TableHeader.font", plain)
// UIManager.put("Tree.font", plain)
// UIManager.put("Tree.rowHeight", plain.getSize + 5)
// UIManager.put("List.font", plain)
// UIManager.put("TextField.font", plain)
// UIManager.put("PasswordField.font", plain)
// UIManager.put("TextArea.font", plain)
// UIManager.put("ToolTip.font", plain)
// not needed with FlatLAF
}

}
4 changes: 2 additions & 2 deletions src/main/scala/net/kogics/kojo/lite/Versions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package net.kogics.kojo.lite
object Versions {
val KojoMajorVersion = "2.9"
val KojoVersion = "2.9.12"
val KojoRevision = "r8"
val KojoBuildDate = "22 September 2021"
val KojoRevision = "r9"
val KojoBuildDate = "23 September 2021"
val JavaVersion = {
val jrv = System.getProperty("java.runtime.version")
val arch = System.getProperty("os.arch")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ abstract class NumberManipulator(ctx: ManipulationContext) extends InteractiveMa
def actionPerformed(e: ActionEvent): Unit = {
stepL(stepT, zoomB)
focusSlider()
panel.invalidate()
panel.repaint()
}
}
stepB.addActionListener(al)
Expand Down

0 comments on commit 11f8c79

Please sign in to comment.