Skip to content

Commit

Permalink
Core(Gtk): fix setting of style
Browse files Browse the repository at this point in the history
Fix setting of style in widgets in certain cases (when widget's CSS path
contains spaces).
  • Loading branch information
webwarrior-ws authored and aarani committed Apr 24, 2023
1 parent 9693359 commit 0432f4e
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 0432f4e

Please sign in to comment.