[libadwaita/wip/exalm/tab-style: 3/5] tab: Use selected state instead of checked
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/tab-style: 3/5] tab: Use selected state instead of checked
- Date: Wed, 6 Apr 2022 22:30:54 +0000 (UTC)
commit adce32722db80bf83dc98d14f908327aac631069
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Apr 7 02:11:34 2022 +0400
tab: Use selected state instead of checked
This just makes more sense.
src/adw-tab-box.c | 4 ++--
src/adw-tab.c | 4 ++--
src/stylesheet/widgets/_tab-view.scss | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index 79415725..fc395048 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -414,7 +414,7 @@ update_separators (AdwTabBox *self)
GList *l;
GtkStateFlags mask = GTK_STATE_FLAG_PRELIGHT |
GTK_STATE_FLAG_ACTIVE |
- GTK_STATE_FLAG_CHECKED;
+ GTK_STATE_FLAG_SELECTED;
TabInfo *last_pinned_tab = NULL;
/* We have a separator between pinned and non-pinned tabs, and we need to
@@ -1725,7 +1725,7 @@ state_flags_changed_cb (GtkWidget *tab,
GtkStateFlags flags = gtk_widget_get_state_flags (tab);
GtkStateFlags mask = GTK_STATE_FLAG_PRELIGHT |
GTK_STATE_FLAG_ACTIVE |
- GTK_STATE_FLAG_CHECKED;
+ GTK_STATE_FLAG_SELECTED;
if ((flags ^ previous) & mask)
update_separators (self);
diff --git a/src/adw-tab.c b/src/adw-tab.c
index a9e0eb9c..3a4a9da8 100644
--- a/src/adw-tab.c
+++ b/src/adw-tab.c
@@ -115,10 +115,10 @@ update_state (AdwTab *self)
gboolean show_close;
new_state = gtk_widget_get_state_flags (GTK_WIDGET (self)) &
- ~GTK_STATE_FLAG_CHECKED;
+ ~GTK_STATE_FLAG_SELECTED;
if (self->selected || self->dragging)
- new_state |= GTK_STATE_FLAG_CHECKED;
+ new_state |= GTK_STATE_FLAG_SELECTED;
gtk_widget_set_state_flags (GTK_WIDGET (self), new_state, TRUE);
diff --git a/src/stylesheet/widgets/_tab-view.scss b/src/stylesheet/widgets/_tab-view.scss
index b71e0990..66649b12 100644
--- a/src/stylesheet/widgets/_tab-view.scss
+++ b/src/stylesheet/widgets/_tab-view.scss
@@ -28,12 +28,12 @@ tabbar {
@if $contrast == 'high' {
&:hover,
&:active,
- &:checked {
+ &:selected {
box-shadow: inset 0 0 0 1px $border_color;
}
}
- &:checked {
+ &:selected {
background-color: $view_selected_color;
&:hover {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]