From 13662abc69811add457828bd94eecccd6b76fd06 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sat, 8 Jul 2017 09:34:47 +0200 Subject: [PATCH] Fixed #128 and probably fixed #126. --- resources/text/CHANGELOG | 4 +++- src/gui/tabbar.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 48316edba..9b417b2a0 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -21,7 +21,9 @@ Changed: ▪ Tweaked some conditions for determining newly "updated" messages in ATOM format. (issue #103) Fixed: -▪ Settings and database are now stored in more standard directories on Mac OS X (#127) +▪ Tab not closing after close button click on Mac OS X. (#126) +▪ Wrong tab bar item close button position on Mac OS X. (#128) +▪ Settings and database are now stored in more standard directories on Mac OS X. (#127) ▪ Fixed regression when restoring deleted messages. ▪ Crash in TT-RSS plugin on application exit, when TT-RSS user needed to be logged out. diff --git a/src/gui/tabbar.cpp b/src/gui/tabbar.cpp index 02fbeb92c..de8a216ef 100755 --- a/src/gui/tabbar.cpp +++ b/src/gui/tabbar.cpp @@ -36,6 +36,10 @@ TabBar::~TabBar() { } void TabBar::setTabType(int index, const TabBar::TabType &type) { + const QTabBar::ButtonPosition button_position = static_cast(style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, + 0, + this)); + switch (type) { case TabBar::DownloadManager: case TabBar::Closable: { @@ -48,14 +52,14 @@ void TabBar::setTabType(int index, const TabBar::TabType &type) { // Close underlying tab when button is clicked. connect(close_button, &PlainToolButton::clicked, this, &TabBar::closeTabViaButton); - setTabButton(index, QTabBar::RightSide, close_button); + setTabButton(index, button_position, close_button); break; } case TabBar::NonClosable: case TabBar::FeedReader: default: - setTabButton(index, QTabBar::RightSide, 0); + setTabButton(index, button_position, 0); break; }