зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1654323 - Use GtkTextView.text.selection to get selection colors in GTK. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D84814
This commit is contained in:
Родитель
e5ff26cbb8
Коммит
2d4dbdf603
|
@ -1073,6 +1073,9 @@ static GtkStyleContext* GetCssNodeStyleInternal(WidgetNodeType aNodeType) {
|
||||||
style = CreateSubStyleWithClass(MOZ_GTK_SCROLLED_WINDOW,
|
style = CreateSubStyleWithClass(MOZ_GTK_SCROLLED_WINDOW,
|
||||||
GTK_STYLE_CLASS_FRAME);
|
GTK_STYLE_CLASS_FRAME);
|
||||||
break;
|
break;
|
||||||
|
case MOZ_GTK_TEXT_VIEW_TEXT_SELECTION:
|
||||||
|
style = CreateChildCSSNode("selection", MOZ_GTK_TEXT_VIEW_TEXT);
|
||||||
|
break;
|
||||||
case MOZ_GTK_TEXT_VIEW_TEXT:
|
case MOZ_GTK_TEXT_VIEW_TEXT:
|
||||||
case MOZ_GTK_RESIZER:
|
case MOZ_GTK_RESIZER:
|
||||||
style = CreateChildCSSNode("text", MOZ_GTK_TEXT_VIEW);
|
style = CreateChildCSSNode("text", MOZ_GTK_TEXT_VIEW);
|
||||||
|
|
|
@ -211,6 +211,8 @@ typedef enum {
|
||||||
MOZ_GTK_TEXT_VIEW,
|
MOZ_GTK_TEXT_VIEW,
|
||||||
/* The "text" window or node of a GtkTextView */
|
/* The "text" window or node of a GtkTextView */
|
||||||
MOZ_GTK_TEXT_VIEW_TEXT,
|
MOZ_GTK_TEXT_VIEW_TEXT,
|
||||||
|
/* The "selection" node of a GtkTextView.text */
|
||||||
|
MOZ_GTK_TEXT_VIEW_TEXT_SELECTION,
|
||||||
/* Paints a GtkOptionMenu. */
|
/* Paints a GtkOptionMenu. */
|
||||||
MOZ_GTK_DROPDOWN,
|
MOZ_GTK_DROPDOWN,
|
||||||
/* Paints a dropdown arrow (a GtkButton containing a down GtkArrow). */
|
/* Paints a dropdown arrow (a GtkButton containing a down GtkArrow). */
|
||||||
|
|
|
@ -1130,6 +1130,7 @@ void nsLookAndFeel::EnsureInit() {
|
||||||
mFieldText = GDK_RGBA_TO_NS_RGBA(color);
|
mFieldText = GDK_RGBA_TO_NS_RGBA(color);
|
||||||
|
|
||||||
// Selected text and background
|
// Selected text and background
|
||||||
|
style = GetStyleContext(MOZ_GTK_TEXT_VIEW_TEXT_SELECTION);
|
||||||
gtk_style_context_get_background_color(
|
gtk_style_context_get_background_color(
|
||||||
style,
|
style,
|
||||||
static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED |
|
static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED |
|
||||||
|
|
Загрузка…
Ссылка в новой задаче