Support setting sliders brighter #13

When dark theme is used, sliders (especially progress on fullscreen) tend to look a little too dark (as if they were disabled). To overcome this, add an option to force them to be 20% brighter.
This commit is contained in:
Rafostar
2020-11-21 15:20:09 +01:00
parent c221f7cdb6
commit f5e5071937
5 changed files with 59 additions and 12 deletions

View File

@@ -24,7 +24,10 @@ class ClapperGeneralPage extends PrefsBase.Grid
comboBox.connect('changed', this._onVolumeInitialChanged.bind(this, spinButton));
this.addTitle('Appearance');
this.addCheckButton('Enable dark theme', 'dark-theme');
let darkCheck = this.addCheckButton('Enable dark theme', 'dark-theme');
let brighterCheck = this.addCheckButton('Make sliders brighter', 'brighter-sliders');
this._onDarkThemeToggled(brighterCheck, darkCheck);
darkCheck.connect('toggled', this._onDarkThemeToggled.bind(this, brighterCheck));
}
_onVolumeInitialChanged(spinButton, comboBox)
@@ -32,6 +35,12 @@ class ClapperGeneralPage extends PrefsBase.Grid
let value = comboBox.get_active_id();
spinButton.set_visible(value === 'custom');
}
_onDarkThemeToggled(brighterCheck, darkCheck)
{
let isActive = darkCheck.get_active();
brighterCheck.set_visible(isActive);
}
});
var BehaviourPage = GObject.registerClass(