Skip to content

Commit

Permalink
#179: fixes visual glitch for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
rladstaetter committed Dec 26, 2023
1 parent 45ee058 commit 01a0ab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/src/main/scala/app/logorrr/views/main/LogoRRRMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import app.logorrr.model.LogFileSettings
import app.logorrr.util.CanLog
import app.logorrr.views.logfiletab.LogFileTab
import javafx.scene.layout.BorderPane
import javafx.stage.Window

import java.nio.file.Path
import scala.collection.mutable
Expand All @@ -16,14 +15,12 @@ import scala.concurrent.{Await, Future}
class LogoRRRMain(closeStage: => Unit) extends BorderPane with CanLog {

val mainTabPane = new MainTabPane

val bar = new MainMenuBar(() => getScene.getWindow, openLogFile, closeAllLogFiles(), closeStage)

def getLogFileTabs: mutable.Seq[LogFileTab] = mainTabPane.getLogFileTabs

def getWindow: Window = getScene.getWindow()

def init(): Unit = {
setTop(new MainMenuBar(() => getWindow, openLogFile, closeAllLogFiles(), closeStage))
setTop(bar)
setCenter(mainTabPane)
val entries = LogoRRRGlobals.getOrderedLogFileSettings
if (entries.nonEmpty) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class MainMenuBar(getWindow: () => Window
with CanLog {

setUseSystemMenuBar(OsUtil.isMac)
setManaged(!OsUtil.isMac) // set managed to false for mac to fix visual glitch (https://github.com/rladstaetter/LogoRRR/issues/179)

private def init(): Unit = {
getMenus.clear()
Expand Down

0 comments on commit 01a0ab3

Please sign in to comment.