themes: fix QTabBar's padding

This commit is contained in:
Le Tan 2017-12-25 19:43:52 +08:00
parent b0c5961552
commit 7b8c522a53
5 changed files with 13 additions and 5 deletions

View File

@ -739,7 +739,7 @@ QTabBar::tab {
border: none; border: none;
border-top: 2px solid transparent; border-top: 2px solid transparent;
border-right: 1px solid @tabbar_border; border-right: 1px solid @tabbar_border;
padding: 2px; padding: 2px 0px 2px 0px;
} }
QTabBar::tab:selected { QTabBar::tab:selected {

View File

@ -743,7 +743,7 @@ QTabBar::tab {
border: none; border: none;
border-top: 2px solid transparent; border-top: 2px solid transparent;
border-right: 1px solid @tabbar_border; border-right: 1px solid @tabbar_border;
padding: 2px; padding: 2px 0px 2px 0px;
} }
QTabBar::tab:selected { QTabBar::tab:selected {

View File

@ -628,7 +628,7 @@ QTabBar::tab {
background: @tabbar_bg; background: @tabbar_bg;
border: none; border: none;
border-right: 1px solid @tabbar_border; border-right: 1px solid @tabbar_border;
padding: 2px; padding: 2px 0px 2px 0px;
} }
QTabBar::tab:selected { QTabBar::tab:selected {

View File

@ -1027,10 +1027,16 @@ bool VEditWindow::showOpenedFileList()
bool VEditWindow::activateTab(int p_sequence) bool VEditWindow::activateTab(int p_sequence)
{ {
if (p_sequence < c_tabSequenceBase || p_sequence >= (c_tabSequenceBase + count())) { if (p_sequence < c_tabSequenceBase
|| p_sequence >= (c_tabSequenceBase + count())) {
return false; return false;
} }
setCurrentIndex(p_sequence - c_tabSequenceBase);
int idx = p_sequence - c_tabSequenceBase;
setCurrentIndex(idx);
// Always need to focus to this tab to meet the requirement of Captain mode.
getTab(idx)->focusTab();
return true; return true;
} }

View File

@ -66,7 +66,9 @@ public:
void focusNextTab(bool p_right); void focusNextTab(bool p_right);
// Return true if the file list is shown. // Return true if the file list is shown.
bool showOpenedFileList(); bool showOpenedFileList();
bool activateTab(int p_sequence); bool activateTab(int p_sequence);
// Switch to previous activated tab. // Switch to previous activated tab.
bool alternateTab(); bool alternateTab();