tests/gtk4: add test for stateversion change
Ensure default behavior with new state version works properly. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
ae9f38e889
commit
d13041d6f0
3 changed files with 31 additions and 0 deletions
|
|
@ -17,4 +17,5 @@
|
|||
gtk4-basic-settings = ./gtk4/gtk4-basic-settings.nix;
|
||||
gtk4-theme-css-injection = ./gtk4/gtk4-theme-css-injection.nix;
|
||||
gtk4-no-theme-css-injection = ./gtk4/gtk4-no-theme-css-injection.nix;
|
||||
gtk4-stateversion-no-theme-inheritance = ./gtk4/gtk4-stateversion-no-theme-inheritance.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
[Settings]
|
||||
gtk-icon-theme-name=Adwaita
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Test that GTK4 theme does NOT inherit from global theme with stateVersion 26.05
|
||||
# This shows the new default behavior where gtk4.theme defaults to null
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
# GTK4 settings should exist but WITHOUT theme (icon theme still inherits)
|
||||
assertFileExists home-files/.config/gtk-4.0/settings.ini
|
||||
assertFileContent home-files/.config/gtk-4.0/settings.ini \
|
||||
${./gtk4-stateversion-no-theme-inheritance-expected.ini}
|
||||
|
||||
# GTK4 CSS should NOT exist since no theme is configured
|
||||
assertPathNotExists home-files/.config/gtk-4.0/gtk.css
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue