From 7950ab5a1f74330c03e5da7ce6076c7d10968688 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sat, 26 Nov 2016 09:35:59 +0500 Subject: [PATCH] macOS might have no GTK configuration, so forcing "only icons" for toolbar. --- ui/mainwindow_init.go | 4 ++++ ui/mainwindow_init_mac.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ui/mainwindow_init.go b/ui/mainwindow_init.go index 0b530a2..50a97aa 100644 --- a/ui/mainwindow_init.go +++ b/ui/mainwindow_init.go @@ -156,6 +156,10 @@ func (m *MainWindow) Initialize() { m.window.Add(m.vbox) + if runtime.GOOS == "darwin" { + m.initializeMacAfter() + } + m.window.ShowAll() // Launch events. diff --git a/ui/mainwindow_init_mac.go b/ui/mainwindow_init_mac.go index cfed101..44bf0a1 100644 --- a/ui/mainwindow_init_mac.go +++ b/ui/mainwindow_init_mac.go @@ -21,6 +21,10 @@ func (m *MainWindow) initializeMac() { } } +func (m *MainWindow) initializeMacAfter() { + m.toolbar.SetStyle(gtk.TOOLBAR_ICONS) +} + func (m *MainWindow) initializeMacMenu() { // This is a placeholder, in future we will use native mac menu. // For now it launches default menu initialization.