Skip to content

Commit

Permalink
Improve the look of the Color Scheme selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce committed Feb 1, 2024
1 parent db37667 commit 12e020c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion data/assets/by-apps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion data/assets/dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion data/assets/light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ spinbutton.flat {
}

.ensor-box > flowbox > flowboxchild {
border-radius: 999px;
padding: 0;
}

Expand All @@ -235,18 +234,19 @@ spinbutton.flat {
.color-scheme-button {
padding: 6px;
background: none;
}
.color-scheme-button image {
box-shadow: 0 0 0 1px alpha(@outline, 0.38);
border-radius: 8px;
}
.color-scheme-button .content-block-image {
margin: 0;
box-shadow: inset 0 0 0 1px alpha(@outline, 0.38);
}
.color-scheme-button label {
font-weight: 500;
}
.color-scheme-button:hover image {
.color-scheme-button:hover {
box-shadow: 0 0 0 1px @outline;
}
.color-scheme-button:checked image {
.color-scheme-button:checked {
box-shadow: 0 0 0 3px @accent_color;
}
.color-scheme-button:checked label {
Expand Down
25 changes: 15 additions & 10 deletions fuses/appearance/AppearanceView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,12 @@ public class AppearanceView : Gtk.Box {
};
prefer_sublabel.add_css_class ("cb-subtitle");

var prefer_default_image = new Gtk.Image.from_resource ("/com/fyralabs/Fusebox/Appearance/by-apps.svg") {
pixel_size = 80,
hexpand = true,
halign = Gtk.Align.START
var prefer_default_image = new He.ContentBlockImage ("resource:///com/fyralabs/Fusebox/Appearance/by-apps.svg") {
requested_width = 80,
requested_height = 80,
valign = Gtk.Align.START
};
prefer_default_image.add_css_class ("large-radius");

var prefer_default_card = new Gtk.Grid ();
prefer_default_card.attach (prefer_default_image, 0, 0);
Expand All @@ -173,10 +174,12 @@ public class AppearanceView : Gtk.Box {
prefer_default_radio.add_css_class ("color-scheme-button");
prefer_default_radio.child = (prefer_default_grid);

var prefer_light_image = new Gtk.Image.from_resource ("/com/fyralabs/Fusebox/Appearance/light.svg") {
pixel_size = 80,
halign = Gtk.Align.START
var prefer_light_image = new He.ContentBlockImage ("resource:///com/fyralabs/Fusebox/Appearance/light.svg") {
requested_width = 80,
requested_height = 80,
valign = Gtk.Align.START
};
prefer_light_image.add_css_class ("large-radius");

var prefer_light_card = new Gtk.Grid ();
prefer_light_card.attach (prefer_light_image, 0, 0);
Expand All @@ -201,10 +204,12 @@ public class AppearanceView : Gtk.Box {
prefer_light_radio.add_css_class ("color-scheme-button");
prefer_light_radio.child = (prefer_light_grid);

var dark_image = new Gtk.Image.from_resource ("/com/fyralabs/Fusebox/Appearance/dark.svg") {
pixel_size = 80,
halign = Gtk.Align.START
var dark_image = new He.ContentBlockImage ("resource:///com/fyralabs/Fusebox/Appearance/dark.svg") {
requested_width = 80,
requested_height = 80,
valign = Gtk.Align.START
};
dark_image.add_css_class ("large-radius");

var dark_card = new Gtk.Grid ();
dark_card.attach (dark_image, 0, 0);
Expand Down

0 comments on commit 12e020c

Please sign in to comment.