Merge pull request #261 from Rafostar/adw-fixes

libadwaita CSS fixes
This commit is contained in:
Rafał Dzięgiel
2022-05-18 12:26:52 +02:00
committed by GitHub
5 changed files with 67 additions and 42 deletions

View File

@@ -9,6 +9,41 @@ scrolledwindow scrollbar.vertical slider {
min-height: 16px;
}
/* Consistent scales color */
scale trough highlight {
color: @accent_fg_color;
background-color: @accent_bg_color;
}
/* Consistent radio buttons color */
.osd radio {
color: @accent_fg_color;
background-color: transparent;
background-image: none;
}
.osd radio:hover,
.osd radio:checked {
background-image: image(rgba(255,255,255,0.1));
}
.osd radio:active {
background-image: image(rgba(255,255,255,0.3));
}
/* Adwaita OSD background color is unacceptable:
* https://gitlab.gnome.org/GNOME/libadwaita/-/issues/454 */
box.osd,
.osd popover contents,
.osd popover arrow,
.osdheaderbar button {
background-color: rgba(38,38,38,0.78);
}
.osdheaderbar button:hover,
.osdheaderbar button:checked {
background-color: rgba(63,63,63,0.78);
}
.osdheaderbar button:active {
background-color: rgba(82,82,82,0.78);
}
/* Adwaita is missing osd ListBox */
.clapperplaylist {
background: none;
@@ -59,6 +94,8 @@ popover contents {
}
.popoverseparator separator {
background-color: @insensitive_fg_color;
margin-left: 3px;
margin-right: 3px;
}
/* Rounded corners */
@@ -129,8 +166,9 @@ scale trough slider {
margin-left: 0px;
margin-right: 4px;
border: 2px solid;
min-width: 17px;
min-height: 17px;
min-width: 16px;
min-height: 16px;
box-shadow: none;
}
/* Also affects popover buttons */
@@ -260,7 +298,8 @@ scale trough slider {
min-width: 6px;
}
.overamp trough highlight {
background: @error_color;
color: @error_fg_color;
background-color: @error_bg_color;
}
/* Elapsed Popover */
@@ -323,7 +362,7 @@ scale trough slider {
border: none;
}
.controlsbox {
background: @theme_bg_color;
background: @popover_bg_color;
}
.gpufriendly {
box-shadow: -8px -8px transparent, 8px 8px transparent;

View File

@@ -34,7 +34,7 @@
"flathub/lib/uchardet.json",
"flathub/gstreamer-1.0/gstreamer.json",
"testing/gtk4.json",
"flathub/lib/libadwaita.json",
"testing/libadwaita.json",
"testing/gtuber.json",
{
"name": "clapper",

View File

@@ -1,31 +0,0 @@
From b413ee2c7d458c7005d3d3d1da8822cd86893ac0 Mon Sep 17 00:00:00 2001
From: Rafostar <40623528+Rafostar@users.noreply.github.com>
Date: Fri, 4 Dec 2020 19:25:34 +0100
Subject: [PATCH] popover: Call unrealize on hide
When popover is shown "realize" method is called which creates a new
surface for popup. Unfortunately this causes performance drop on Wayland until that
surface is destroyed what happens inside "unrealize" method during popover destruction.
This commit changes default behavior in a way that surface will be destroyed
when popover is closed and app will ragain the performance it lost when
popover was shown.
---
gtk/gtkpopover.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 504dcd6cc1..a7a764d483 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -951,6 +951,7 @@ gtk_popover_hide (GtkWidget *widget)
gtk_popover_set_mnemonics_visible (GTK_POPOVER (widget), FALSE);
_gtk_widget_set_visible_flag (widget, FALSE);
+ gtk_widget_unrealize (widget);
gtk_widget_unmap (widget);
g_signal_emit (widget, signals[CLOSED], 0);
}
--
GitLab

View File

@@ -26,12 +26,8 @@
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/gtk.git",
"tag": "4.6.2",
"commit": "aec7ca82007dbe07faee6be084d20758ebac2b91"
},
{
"type": "patch",
"path": "gtk4-popover-unrealize.patch"
"tag": "4.6.4",
"commit": "1e6bad6c4f412dc0eb7b2f508cb4465929a04303"
}
]
}

View File

@@ -0,0 +1,21 @@
{
"name": "libadwaita",
"buildsystem": "meson",
"config-opts": [
"--buildtype=release",
"--wrap-mode=nofallback",
"-Dintrospection=enabled",
"-Dvapi=false",
"-Dgtk_doc=false",
"-Dtests=false",
"-Dexamples=false"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/libadwaita.git",
"tag": "1.1.1",
"commit": "5ec9f624b23bf78b29dd708e77ccdfcee0a9867a"
}
]
}