From a8a48a4991cc94b759f7e995ab15de5361d25463 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 21 Feb 2016 12:37:23 +0100 Subject: [PATCH] Added tab-style exception for Ubuntu --- src/CMakeLists.txt | 4 ++-- src/menu.cc | 2 +- src/notebook.cc | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9307767..07885da 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,13 +10,13 @@ if(APPLE) set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig") endif() -if(UNIX) #Checking if compiling on Ubuntu that has a buggy menu system +if(UNIX) #Checking if compiling on Ubuntu that for instance has a buggy menu system find_program(LSB_RELEASE_BIN lsb_release) if(LSB_RELEASE_BIN) execute_process(COMMAND ${LSB_RELEASE_BIN} -is OUTPUT_VARIABLE DISTRIBUTION OUTPUT_STRIP_TRAILING_WHITESPACE) if((DISTRIBUTION STREQUAL Ubuntu) OR (DISTRIBUTION STREQUAL LinuxMint)) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCI_UBUNTU_BUGGED_MENU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCI_UBUNTU") endif() endif() endif() diff --git a/src/menu.cc b/src/menu.cc index 3627947..e546484 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -7,7 +7,7 @@ Menu::Menu() { auto accels=Config::get().menu.keys; for(auto &accel: accels) { -#ifdef JUCI_UBUNTU_BUGGED_MENU +#ifdef JUCI_UBUNTU size_t pos=0; std::string second=accel.second; while((pos=second.find('<', pos))!=std::string::npos) { diff --git a/src/notebook.cc b/src/notebook.cc index da65512..052a65a 100644 --- a/src/notebook.cc +++ b/src/notebook.cc @@ -52,8 +52,13 @@ Notebook::TabLabel::TabLabel(const std::string &title) : Gtk::Box(Gtk::ORIENTATI Notebook::Notebook() : Gtk::Notebook(), last_index(-1) { Gsv::init(); + //Ubuntu forces its own theme std::string data = ".notebook {\n" +#ifdef JUCI_UBUNTU + "padding: 1px;\n" +#else "padding: 4px;\n" +#endif "-GtkNotebook-tab-overlap: 0px;\n" "-GtkNotebook-show-border: 0;\n" "}";