Skip to content

Commit

Permalink
Merge PR lytico#10 from webwarrior-ws/fix-button-colors
Browse files Browse the repository at this point in the history
Core(Gtk): fix button colors.
  • Loading branch information
knocte committed Mar 16, 2023
2 parents 0bc11bb + f59dd7a commit 791aad0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Core/src/Platform/Gtk/GtkCssExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public static string CssMainNode(this Gtk.Widget nativeView)
case Gtk.ComboBox box:

default:
mainNode = nativeView.StyleContext.Path.ToString().Split(':')[0];
var pathSegments = nativeView.StyleContext.Path.ToString().Split(' ');
mainNode = pathSegments[pathSegments.Length - 1].Split(':')[0];

break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Gtk/WidgetColorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void SetBackgroundColor(this Gtk.Widget widget, Gtk.StateFlags sta
var mainNode = widget.CssMainNode();
if (cssFlags != null)
mainNode = $"{mainNode}:{cssFlags}";
widget.SetStyleColor(color, mainNode, "background-color");
widget.SetStyleColor(color, mainNode, "background");

}

Expand Down

0 comments on commit 791aad0

Please sign in to comment.