Fixed #128 and probably fixed #126.

This commit is contained in:
Martin Rotter 2017-07-08 09:34:47 +02:00
parent 6db681386d
commit 13662abc69
2 changed files with 9 additions and 3 deletions

View File

@ -21,7 +21,9 @@ Changed:
▪ Tweaked some conditions for determining newly "updated" messages in ATOM format. (issue #103) ▪ Tweaked some conditions for determining newly "updated" messages in ATOM format. (issue #103)
Fixed: 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. ▪ Fixed regression when restoring deleted messages.
▪ Crash in TT-RSS plugin on application exit, when TT-RSS user needed to be logged out. ▪ Crash in TT-RSS plugin on application exit, when TT-RSS user needed to be logged out.

View File

@ -36,6 +36,10 @@ TabBar::~TabBar() {
} }
void TabBar::setTabType(int index, const TabBar::TabType &type) { void TabBar::setTabType(int index, const TabBar::TabType &type) {
const QTabBar::ButtonPosition button_position = static_cast<ButtonPosition>(style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition,
0,
this));
switch (type) { switch (type) {
case TabBar::DownloadManager: case TabBar::DownloadManager:
case TabBar::Closable: { case TabBar::Closable: {
@ -48,14 +52,14 @@ void TabBar::setTabType(int index, const TabBar::TabType &type) {
// Close underlying tab when button is clicked. // Close underlying tab when button is clicked.
connect(close_button, &PlainToolButton::clicked, this, &TabBar::closeTabViaButton); connect(close_button, &PlainToolButton::clicked, this, &TabBar::closeTabViaButton);
setTabButton(index, QTabBar::RightSide, close_button); setTabButton(index, button_position, close_button);
break; break;
} }
case TabBar::NonClosable: case TabBar::NonClosable:
case TabBar::FeedReader: case TabBar::FeedReader:
default: default:
setTabButton(index, QTabBar::RightSide, 0); setTabButton(index, button_position, 0);
break; break;
} }