mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Move theme settings to "Tweaks" prefs tab
Altering default theme is more of a tweak then a general setting
This commit is contained in:
@@ -13,7 +13,6 @@ class ClapperGeneralPage extends PrefsBase.Grid
|
|||||||
|
|
||||||
this.addTitle('Startup');
|
this.addTitle('Startup');
|
||||||
this.addCheckButton('Auto enter fullscreen', 'fullscreen-auto');
|
this.addCheckButton('Auto enter fullscreen', 'fullscreen-auto');
|
||||||
this.addCheckButton('Close after playback', 'close-auto');
|
|
||||||
|
|
||||||
this.addTitle('Volume');
|
this.addTitle('Volume');
|
||||||
let comboBox = this.addComboBoxText('Initial value', [
|
let comboBox = this.addComboBoxText('Initial value', [
|
||||||
@@ -24,11 +23,8 @@ class ClapperGeneralPage extends PrefsBase.Grid
|
|||||||
this._onVolumeInitialChanged(spinButton, comboBox);
|
this._onVolumeInitialChanged(spinButton, comboBox);
|
||||||
comboBox.connect('changed', this._onVolumeInitialChanged.bind(this, spinButton));
|
comboBox.connect('changed', this._onVolumeInitialChanged.bind(this, spinButton));
|
||||||
|
|
||||||
this.addTitle('Appearance');
|
this.addTitle('Finish');
|
||||||
let darkCheck = this.addCheckButton('Enable dark theme', 'dark-theme');
|
this.addCheckButton('Close after playback', 'close-auto');
|
||||||
let brighterCheck = this.addCheckButton('Make sliders brighter', 'brighter-sliders');
|
|
||||||
this._onDarkThemeToggled(brighterCheck, darkCheck);
|
|
||||||
darkCheck.connect('toggled', this._onDarkThemeToggled.bind(this, brighterCheck));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onVolumeInitialChanged(spinButton, comboBox)
|
_onVolumeInitialChanged(spinButton, comboBox)
|
||||||
@@ -36,12 +32,6 @@ class ClapperGeneralPage extends PrefsBase.Grid
|
|||||||
let value = comboBox.get_active_id();
|
let value = comboBox.get_active_id();
|
||||||
spinButton.set_visible(value === 'custom');
|
spinButton.set_visible(value === 'custom');
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDarkThemeToggled(brighterCheck, darkCheck)
|
|
||||||
{
|
|
||||||
let isActive = darkCheck.get_active();
|
|
||||||
brighterCheck.set_visible(isActive);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var BehaviourPage = GObject.registerClass(
|
var BehaviourPage = GObject.registerClass(
|
||||||
@@ -291,7 +281,19 @@ class ClapperTweaksPage extends PrefsBase.Grid
|
|||||||
{
|
{
|
||||||
super._init();
|
super._init();
|
||||||
|
|
||||||
|
this.addTitle('Appearance');
|
||||||
|
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));
|
||||||
|
|
||||||
this.addTitle('Performance');
|
this.addTitle('Performance');
|
||||||
this.addCheckButton('Render window shadows', 'render-shadows');
|
this.addCheckButton('Render window shadows', 'render-shadows');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_onDarkThemeToggled(brighterCheck, darkCheck)
|
||||||
|
{
|
||||||
|
let isActive = darkCheck.get_active();
|
||||||
|
brighterCheck.set_visible(isActive);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user