mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 07:37:29 +09:00
[GTK3] Use WidgetCache to get colors at nsLookAndFeel
This commit is contained in:
parent
6a029bbbad
commit
9461197f53
4 changed files with 38 additions and 46 deletions
|
|
@ -1161,16 +1161,10 @@ nsLookAndFeel::Init()
|
|||
style = ClaimStyleContext(MOZ_GTK_TOOLTIP);
|
||||
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sInfoBackground = GDK_RGBA_TO_NS_RGBA(color);
|
||||
{
|
||||
GtkStyleContext* boxStyle =
|
||||
CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0),
|
||||
style);
|
||||
GtkStyleContext* labelStyle =
|
||||
CreateStyleForWidget(gtk_label_new(nullptr), boxStyle);
|
||||
gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color);
|
||||
g_object_unref(labelStyle);
|
||||
g_object_unref(boxStyle);
|
||||
}
|
||||
ReleaseStyleContext(style);
|
||||
|
||||
style = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL);
|
||||
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sInfoText = GDK_RGBA_TO_NS_RGBA(color);
|
||||
ReleaseStyleContext(style);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue