mirror of
https://github.com/huderlem/porymap.git
synced 2026-10-02 04:46:42 -05:00
Add disabled theme for QSlider
This commit is contained in:
@@ -387,3 +387,24 @@ QHeaderView {
|
||||
margin: 0px;
|
||||
font: 12px;
|
||||
}
|
||||
|
||||
/* Sliders */
|
||||
|
||||
/* Qt doesn't change the style of disabled sliders, so we do it ourselves */
|
||||
QSlider::groove:horizontal:disabled {
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
height: 2px;
|
||||
background: none;
|
||||
}
|
||||
QSlider::sub-page:horizontal:disabled {
|
||||
background: #B1B1B1;
|
||||
}
|
||||
QSlider::handle:horizontal:disabled {
|
||||
border: 1px solid #444444;
|
||||
border-radius: 3px;
|
||||
width: 10px;
|
||||
height: 9px;
|
||||
margin: -5px -1px;
|
||||
background: #5C5C5C;
|
||||
}
|
||||
|
||||
@@ -23,3 +23,22 @@ QAbstractSpinBox {
|
||||
QAbstractSpinBox:disabled {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
/* Qt doesn't change the style of disabled sliders, so we do it ourselves */
|
||||
QSlider::groove:horizontal:disabled {
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
height: 2px;
|
||||
background: none;
|
||||
}
|
||||
QSlider::sub-page:horizontal:disabled {
|
||||
background: #B1B1B1;
|
||||
}
|
||||
QSlider::handle:horizontal:disabled {
|
||||
border: 1px solid #444444;
|
||||
border-radius: 3px;
|
||||
width: 10px;
|
||||
height: 9px;
|
||||
margin: -5px -1px;
|
||||
background: #5C5C5C;
|
||||
}
|
||||
|
||||
@@ -388,3 +388,24 @@ QHeaderView {
|
||||
margin: 0px;
|
||||
font: 12px;
|
||||
}
|
||||
|
||||
/* Sliders */
|
||||
|
||||
/* Qt doesn't change the style of disabled sliders, so we do it ourselves */
|
||||
QSlider::groove:horizontal:disabled {
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
height: 2px;
|
||||
background: none;
|
||||
}
|
||||
QSlider::sub-page:horizontal:disabled {
|
||||
background: #B1B1B1;
|
||||
}
|
||||
QSlider::handle:horizontal:disabled {
|
||||
border: 1px solid #444444;
|
||||
border-radius: 3px;
|
||||
width: 10px;
|
||||
height: 9px;
|
||||
margin: -5px -1px;
|
||||
background: #5C5C5C;
|
||||
}
|
||||
|
||||
@@ -2490,13 +2490,6 @@ void MainWindow::on_groupBox_DiveMapOpacity_toggled(bool on) {
|
||||
}
|
||||
|
||||
void MainWindow::setDivingMapsVisible(bool visible) {
|
||||
// Qt doesn't change the style of disabled sliders, so we do it ourselves
|
||||
QString stylesheet = visible ? "" : "QSlider::groove:horizontal {border: 1px solid #999999; border-radius: 3px; height: 2px; background: #B1B1B1;}"
|
||||
"QSlider::handle:horizontal {border: 1px solid #444444; border-radius: 3px; width: 10px; height: 9px; margin: -5px -1px; background: #5C5C5C; }";
|
||||
ui->slider_DiveEmergeMapOpacity->setStyleSheet(stylesheet);
|
||||
ui->slider_DiveMapOpacity->setStyleSheet(stylesheet);
|
||||
ui->slider_EmergeMapOpacity->setStyleSheet(stylesheet);
|
||||
|
||||
// Sync UI toggle elements
|
||||
const QSignalBlocker blocker1(ui->groupBox_DiveMapOpacity);
|
||||
const QSignalBlocker blocker2(ui->actionDive_Emerge_Map);
|
||||
|
||||
Reference in New Issue
Block a user