Qt: remove redundant custom toolbar colors.

They got too complicated when used with stylesheets. I left the gamelist icon color option since it does in no way interfere with the stylesheets
This commit is contained in:
Megamouse 2018-07-01 20:46:26 +02:00 committed by Ivan
parent 1270ee4b38
commit 3a5ce90148
7 changed files with 38 additions and 130 deletions

View file

@ -321,38 +321,32 @@ void rpcs3_app::InitializeConnects()
*/
void rpcs3_app::OnChangeStyleSheetRequest(const QString& path)
{
auto rgba = [](const QColor& c, int v = 0)
{
return QString("rgba(%1, %2, %3, %4);").arg(c.red() + v).arg(c.green() + v).arg(c.blue() + v).arg(c.alpha() + v);
};
QString rgba_tool_bar = rgba(gui::mw_tool_bar_color);
QString style_sheet
(
// main window toolbar search
"QLineEdit#mw_searchbar { padding: 0 1em; background: #fdfdfd; selection-background-color: #148aff; margin: .8em; color:#000000; }"
// main window toolbar slider
"QSlider#sizeSlider { color: #505050; background: " + rgba_tool_bar + "; }"
"QSlider#sizeSlider::handle:horizontal { border: 0em smooth " + rgba(gui::mw_tool_bar_color, -13) + " border-radius: .58em; background: " + rgba(gui::mw_tool_icon_color, -27) + " width: 1.2em; margin: -.5em 0; }"
"QSlider#sizeSlider::groove:horizontal { border-radius: .15em; background: " + rgba(gui::mw_tool_icon_color) + " height: .3em; }"
"QSlider#sizeSlider { color: #505050; background: #F0F0F0; }"
"QSlider#sizeSlider::handle:horizontal { border: 0em smooth rgba(227, 227, 227, 255); border-radius: .58em; background: #404040; width: 1.2em; margin: -.5em 0; }"
"QSlider#sizeSlider::groove:horizontal { border-radius: .15em; background: #5b5b5b; height: .3em; }"
// main window toolbar
"QToolBar#mw_toolbar { background-color: " + rgba_tool_bar + " }"
"QToolBar#mw_toolbar::separator { background-color: " + rgba(gui::mw_tool_bar_color, -20) + " width: 0.125em; margin-top: 0.250em; margin-bottom: 0.250em; }"
"QToolBar#mw_toolbar { background-color: #F0F0F0; }"
"QToolBar#mw_toolbar::separator { background-color: rgba(207, 207, 207, 235); width: 0.125em; margin-top: 0.250em; margin-bottom: 0.250em; }"
// main window toolbar icon color
"QLabel#toolbar_icon_color { color: " + rgba(gui::mw_tool_icon_color) + " }"
"QLabel#toolbar_icon_color { color: #5b5b5b; }"
// thumbnail icon color
"QLabel#thumbnail_icon_color { color: " + rgba(gui::mw_thumb_icon_color) + " }"
"QLabel#thumbnail_icon_color { color: rgba(0, 100, 231, 255); }"
// game list icon color
"QLabel#gamelist_icon_background_color { color: " + rgba(gui::gl_icon_color) + " }"
"QLabel#gamelist_icon_background_color { color: rgba(36, 36, 36, 255); }"
// tables
"QTableWidget { alternate-background-color: #f2f2f2; background-color: rgba(255, 255, 255, 255); }"
"QTableWidget#game_grid { alternate-background-color: #f2f2f2; background-color: rgba(255, 255, 255, 255); font-weight: 600; font-size: 8pt; font-family: Lucida Grande; color: rgba(51, 51, 51, 255); }"
"QTableWidget { alternate-background-color: #f2f2f2; background-color: #fff; }"
"QTableWidget#game_grid { alternate-background-color: #f2f2f2; background-color: #fff; font-weight: 600; font-size: 8pt; font-family: Lucida Grande; color: rgba(51, 51, 51, 255); }"
"QTableView::item { border-left: 0.063em solid white; border-right: 0.063em solid white; padding-left:0.313em; }"
"QTableView::item:selected { background-color: #148aff; color: #fff; }"
"QHeaderView::section { padding-left: .5em; padding-right: .5em; padding-top: .4em; padding-bottom: -.1em; border: 0.063em solid #ffffff; }"