Skip to content

Commit

Permalink
Dark style: add QTableCornerButton. Fix padding for tables.
Browse files Browse the repository at this point in the history
CodeDiffDialog: Fix QTableWidget UI issues
  • Loading branch information
TryTwo committed Nov 4, 2023
1 parent 03f8ec0 commit 6287bb9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Source/Core/DolphinQt/Debugger/CodeDiffDialog.cpp
Expand Up @@ -61,7 +61,7 @@ void CodeDiffDialog::CreateWidgets()
m_record_btn = new QPushButton(tr("Start Recording"));
m_record_btn->setCheckable(true);
m_record_btn->setStyleSheet(RECORD_BUTTON_STYLESHEET);

m_record_btn->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
m_exclude_btn->setEnabled(false);
m_include_btn->setEnabled(false);

Expand Down Expand Up @@ -89,6 +89,7 @@ void CodeDiffDialog::CreateWidgets()
m_matching_results_table->setColumnWidth(2, 4);
m_matching_results_table->setColumnWidth(3, 210);
m_matching_results_table->setColumnWidth(4, 65);
m_matching_results_table->setCornerButtonEnabled(false);
m_reset_btn = new QPushButton(tr("Reset All"));
m_reset_btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
m_help_btn = new QPushButton(tr("Help"));
Expand Down
24 changes: 16 additions & 8 deletions Source/Core/DolphinQt/Styles/Dark/dark.qss
Expand Up @@ -82,19 +82,20 @@ QColumnView::item:focus, QListView::item:focus, QTableView::item:focus, QTableWi
background-color: #606060;
}
*/

/*
Qt is extremely convinced that the sort arrow belongs on the right side
of the header and will reserve space for it there. The padding is to deal with this fact.
*/
QHeaderView::section {
background-color: #202020;
border: 0px;
border-right: 1px solid #7e7e7e;
padding: 0px;
text-align: right;

/*
this is a hack, Qt is extremely convinced that the sort arrow belongs on the right side
of the header and will reserve space for it there. so this applies that same space to the left
so the text is still centered correctly.
*/
padding-right: -10px;
}
QHeaderView::section::vertical {
padding-left: 10px;
padding-right: 0px;
}
QHeaderView::section:last {
border-right: 0px;
Expand Down Expand Up @@ -485,3 +486,10 @@ QTabBar QToolButton::left-arrow {
QTabBar QToolButton::right-arrow {
image: url(:/dolphin_dark_win/right-triangle-tabbar.svg);
}
QTableCornerButton::section {
background-color: #202020;
border: 1px solid #7e7e7e;
border-top: 0px;
border-left: 0px;
border-bottom: 0px;
}

0 comments on commit 6287bb9

Please sign in to comment.