Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] New commits caused a problem. The widgets have lost their styling. #291

Open
NextStep-IM opened this issue Feb 26, 2024 · 16 comments

Comments

@NextStep-IM
Copy link

NextStep-IM commented Feb 26, 2024

  • I have read the wiki
  • Linux distro: Arco Linux

The issue

I just updated to the newest commits and every widget seems to have lost its styling. Changing wallpaper (which changes colorscheme) seems to solve the problem but the widgets lose their styling again if I restart ags.

Click to expand

ags-bug
ags-bug-2

rm: cannot remove '/home/samtheradiant/.cache/ags/media/latex/*': No such file or directory

(com.github.Aylur.ags:67052): Gjs-Console-WARNING **: 22:48:30.023: Window.popup is DEPRECATED. the click away functionality depends on a bug which was patched in Hyprland and it never worked on Sway anyway. to close on the esc key use self.keybind("Escape", () => App.closeWindow("window-name"))

(com.github.Aylur.ags:67052): Gjs-Console-WARNING **: 22:48:30.112: Window.popup is DEPRECATED. the click away functionality depends on a bug which was patched in Hyprland and it never worked on Sway anyway. to close on the esc key use self.keybind("Escape", () => App.closeWindow("window-name"))

(com.github.Aylur.ags:67052): Gjs-Console-WARNING **: 22:48:30.137: Window.popup is DEPRECATED. the click away functionality depends on a bug which was patched in Hyprland and it never worked on Sway anyway. to close on the esc key use self.keybind("Escape", () => App.closeWindow("window-name"))

(com.github.Aylur.ags:67052): Gjs-Console-WARNING **: 22:48:30.167: Window.popup is DEPRECATED. the click away functionality depends on a bug which was patched in Hyprland and it never worked on Sway anyway. to close on the esc key use self.keybind("Escape", () => App.closeWindow("window-name"))

(com.github.Aylur.ags:67052): Gjs-Console-WARNING **: 22:48:30.182: Window.popup is DEPRECATED. the click away functionality depends on a bug which was patched in Hyprland and it never worked on Sway anyway. to close on the esc key use self.keybind("Escape", () => App.closeWindow("window-name"))

(com.github.Aylur.ags:67052): Gjs-Console-WARNING **: 22:48:30.193: Window.popup is DEPRECATED. the click away functionality depends on a bug which was patched in Hyprland and it never worked on Sway anyway. to close on the esc key use self.keybind("Escape", () => App.closeWindow("window-name"))
GLib.SpawnError: Failed to execute child process “sass” (No such file or directory)

(com.github.Aylur.ags:67052): Gtk-CRITICAL **: 22:48:30.208: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:67052): Gtk-CRITICAL **: 22:48:30.208: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:67052): Gtk-CRITICAL **: 22:48:30.208: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:67052): Gtk-CRITICAL **: 22:48:30.208: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:67052): Gtk-CRITICAL **: 22:48:30.208: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:67052): Gtk-CRITICAL **: 22:48:30.208: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:67052): GdkPixbuf-CRITICAL **: 22:48:30.556: gdk_pixbuf_new_from_file_at_scale: assertion 'width > 0 || width == -1' failed
Traceback (most recent call last):
  File "/home/samtheradiant/.config/ags/scripts/color_generation/generate_colors_material.py", line 20, in <module>
    img = Image.open(sys.argv[2])
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 3247, in open
    fp = builtins.open(filename, "rb")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'undefined'
Traceback (most recent call last):
  File "/home/samtheradiant/.config/ags/scripts/color_generation/generate_colors_material.py", line 20, in <module>
    img = Image.open(sys.argv[2])
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 3247, in open
    fp = builtins.open(filename, "rb")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'undefined'
Error: Expected type filename for Array element but got type 'undefined'
@NextStep-IM NextStep-IM changed the title [Issue] New commits caused a problem [Issue] New commits caused a problem. The widgets have lost their styling. Feb 26, 2024
@daUnknownCoder
Copy link

  • I have read the wiki
  • Linux distro: Arco Linux

The issue

I just updated to the newest commits and every widget seems to have lost its styling. Changing wallpaper (which changes colorscheme) seems to solve the problem but the widgets lose their styling again if I restart ags.

Click to expand

i got that for a portrait wallpaper, choose a landscape one

@NextStep-IM
Copy link
Author

i got that for a portrait wallpaper, choose a landscape one

No luck. Changing the wallpaper doesn't even change the colorscheme.

@end-4
Copy link
Owner

end-4 commented Feb 27, 2024

yay -S dart-sass

@NextStep-IM
Copy link
Author

Fixed. Thanks, @end-4!

@daUnknownCoder
Copy link

yay -S dart-sass

Hey @end-4, I have dart-sass but when I used a portrait wallpaper

84b4b001-0d7f-43d3-920f-9b68f9ca8baa-Space%20x_5422

This Is the same wallpaper I tried, my bar went nuts?

@end-4
Copy link
Owner

end-4 commented Feb 27, 2024

idk, give logs
run ~/.config/ags/scripts/color_generation/switchwall.sh in terminal

@daUnknownCoder
Copy link

run ~/.config/ags/scripts/color_generation/switchwall.sh in terminal

Error: expected "{".
  ╷
2 │ $darkmode: true;
  │                ^
  ╵
  scss/_material.scss 2:16  @import
  scss/main.scss 8:9        root stylesheet
undefined
Gtk.CssProviderError: style.css:9:5Invalid name of pseudo-class
[Gradience] INFO: Preset Material3_Generated applied successfully for Gtk 3 and Gtk 4 applications.
[Gradience] INFO: In order for changes to take full effect, you need to log out.

image

Only happens with this image, i checked with other images, they work this one doesn't, havent tried many images but why is that possibly happening?

@daUnknownCoder
Copy link

gradience or the colorgen script doesnt respect black colors idk why coz i hav a lot of amoled black wallpapers, which always give bluish color:
image

my eyes say the bg is black, white and red but there's no trace of em' except white, dropping wallpaper to see for urself:
e17871be-562e-4055-8a45-12c2452cddc9-Hacked_5040

i also see that the colors produced are not according to the background like they work for some and not for others like brown, white, blue are the most colors i see:
image

see the bg is sorta pinky but there's no trace of it

there's another one see:
image

@end-4
Copy link
Owner

end-4 commented Feb 28, 2024

can you send ~/.config/ags/scss/_material.scss

@daUnknownCoder
Copy link

for the hacked wallpaper:

$darkmode: true;
$primary: #acc7ff;
$onPrimary: #002e6c;
$primaryContainer: #004397;
$onPrimaryContainer: #d6e2ff;
$secondary: #bfc6dc;
$onSecondary: #283041;
$secondaryContainer: #3f4759;
$onSecondaryContainer: #dae2f9;
$tertiary: #debbdf;
$onTertiary: #402843;
$tertiaryContainer: #583e5b;
$onTertiaryContainer: #fbd7fb;
$error: #ffb4a9;
$onError: #680003;
$errorContainer: #930006;
$onErrorContainer: #ffb4a9;
$colorbarbg: #101012;
$background: #101012;
$onBackground: #e4e2e6;
$surface: #1b1b1e;
$onSurface: #e4e2e6;
$surfaceVariant: #44474f;
$onSurfaceVariant: #c4c6d0;
$outline: #8e9099;
$shadow: #000000;
$inverseSurface: #e4e2e6;
$inverseOnSurface: #2f3033;
$inversePrimary: #005ac5;

for the spacex image:

Warning: Image not in RGB|RGBA format - Converting...
$darkmode: true;
$primary: #acc7ff;
$onPrimary: #002e6c;
$primaryContainer: #004397;
$onPrimaryContainer: #d6e2ff;
$secondary: #bfc6dc;
$onSecondary: #283041;
$secondaryContainer: #3f4759;
$onSecondaryContainer: #dae2f9;
$tertiary: #debbdf;
$onTertiary: #402843;
$tertiaryContainer: #583e5b;
$onTertiaryContainer: #fbd7fb;
$error: #ffb4a9;
$onError: #680003;
$errorContainer: #930006;
$onErrorContainer: #ffb4a9;
$colorbarbg: #101012;
$background: #101012;
$onBackground: #e4e2e6;
$surface: #1b1b1e;
$onSurface: #e4e2e6;
$surfaceVariant: #44474f;
$onSurfaceVariant: #c4c6d0;
$outline: #8e9099;
$shadow: #000000;
$inverseSurface: #e4e2e6;
$inverseOnSurface: #2f3033;
$inversePrimary: #005ac5;

@clsty
Copy link
Collaborator

clsty commented Feb 29, 2024

Ok, so the problem seems obvious: when generating that scss, a "Warning" message blended in and messed up the file.

For solution, we may redirect the STDERR i.e. the warning message to /dev/null, e.g.

    color_generation/generate_colors_material.py --color "$1" "$lightdark" 1> "$HOME"/.cache/ags/user/generated/material_colors.scss 2>/dev/null

Here 1> means redirecting STDOUT and 2> means redirecting STDERR. We output them to different places.

But the solution only works when the warning message is in STDERR.

If it does not work, then we need to find another method.


Plus, let's reopen this issue since talking in a closed issue is kinda weird lol

@clsty clsty reopened this Feb 29, 2024
@NextStep-IM
Copy link
Author

Experienced the problem again with the latest commits.
ags_style_bug
Logs:


(com.github.Aylur.ags:14156): Gjs-Console-CRITICAL **: 05:00:44.694: CSS ERROR: Invalid name of pseudo-class at line 8 in /home/samtheradiant/.cache/ags/user/generated/style.css
Gtk.CssProviderError: style.css:9:5Invalid name of pseudo-class

(com.github.Aylur.ags:14156): Gtk-CRITICAL **: 05:00:44.968: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:14156): Gtk-CRITICAL **: 05:00:44.968: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:14156): Gtk-CRITICAL **: 05:00:44.968: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:14156): Gtk-CRITICAL **: 05:00:44.968: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:14156): Gtk-CRITICAL **: 05:00:44.969: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(com.github.Aylur.ags:14156): Gtk-CRITICAL **: 05:00:44.969: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
Traceback (most recent call last):
  File "/home/samtheradiant/.config/ags/scripts/color_generation/generate_colors_material.py", line 20, in <module>
    img = Image.open(sys.argv[2])
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 3247, in open
    fp = builtins.open(filename, "rb")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'undefined'

@NextStep-IM
Copy link
Author

Aaaaand now its fixed.

@UcraNerd
Copy link

Aaaaand now its fixed.

If it's fixed don't you think that the issue should be closed?

@NextStep-IM
Copy link
Author

If it's fixed don't you think that the issue should be closed?

It fixed itself and I have no idea how. So I left it to end_4 judgement.

@daUnknownCoder
Copy link

daUnknownCoder commented Apr 28, 2024

yo this still happens: #428, new tracker over there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants