Commit Graph

928 Commits

Author SHA1 Message Date
Jakub Steiner
f610fbfc0e Adwaita: use HIG grey for bg_color
- refresh with a light bg color, use the new color palette
2018-11-09 15:37:08 +01:00
Jakub Steiner
1e2d11cc62 Adwaita: fix osd bg color
- don't try deriving from bg_color, osd should be consistent
  for light & dark.

FIxes issue #1449
2018-11-09 11:19:41 +01:00
Adrien Plazas
f1e24ca30a Adwaita: Propagate bg color to titlebar separator descendants
Gives the same background color to all separators descending from a
title bar than to its direct childrens.

This prevents separators which are in a titlebar but not direct children
from the widget with the titlebar style class from being almost
transparent and hence it prevent them from revealing the clear color of
the window's titlebar (black).

https://gitlab.gnome.org/GNOME/gtk/issues/1231
2018-11-09 08:49:38 +01:00
Jakub Steiner
1787f04097 Merge branch 'wip/jimmac/insensitive-progress' into 'master'
Adwaita: draw insensitive progressbars

See merge request GNOME/gtk!360
2018-11-09 07:27:49 +00:00
Jakub Steiner
7b51de6bbd Adwaita: use new HIG colors
- blue selection color, success & destructive colors updates
- blueish tint for dark

Addresses issue #1443
2018-11-08 16:58:13 +01:00
Jakub Steiner
ef82f1799f Adwaita: prevent devel styling break selection mode
- Selection mode does not get the special devel styling.

- removed teh last-child() selector for it doesn't work anymore.
  Better style all section of the headerbar than none. Proper fix pending.

https://source.puri.sm/Librem5/libhandy/issues/57
2018-10-22 10:31:20 +02:00
Jakub Steiner
39843ebb3f Adwaita: fix devel styling for sidebar apps
- don't put the gradient/cogged wheel on apps that have a split headerbar
  due to having a sidebar
2018-10-04 20:36:44 +02:00
Jakub Steiner
278f9a9eda Adwaita: draw insensitive progressbars
- keep inheriting stuff from scales, but
  do draw highlights

Addresses issue #1191
2018-09-26 22:43:31 +02:00
Jakub Steiner
aeca5858d8 Adwaita: tone down the 'devel' styling
The selected bg was too prominent and intefered with button styling.
2018-09-26 15:50:58 +02:00
Benjamin Otte
4b5fb5ec79 treelistmodel: Refactor to add GtkTreeListRow
This patch does multiple things:

1. Add a custom persistent per-row object.
2. Move all per-row API to that object. This means notifications are now
   possible.
3. Add a "passthrough" construct-only property to the TreeListModel that
   influences if the model returns these new object or passes through
   the ones from the model.

This greatly simplifies the code needed to be written for widgetry,
because one can just connect the per-row object to the expanders that
expand and collapse rows.

As an added power feature, these objects can also be passed through
further models (like filter models).

It also adds kind of a hack to Adwaita to make the test look neat.
2018-09-16 18:50:17 +02:00
Jakub Steiner
0edec9bcae Merge branch 'adwaita-fixes' into 'master'
Adwaita fixes

See merge request GNOME/gtk!333
2018-09-10 14:29:54 +00:00
Adrien Plazas
7d12a843f2 Adwaita: Set selection mode to headerbars if it's on ancestors
This allows to set the container of the headerbars in selection mode
rather than having to set the mode to each element of the title bar.
2018-09-10 15:51:12 +02:00
Adrien Plazas
867efe2e33 Adwaita: Style separator.sidebar
Let separators be declared as sidebars to have the same style as those
drawn by GtkStackSidebar. This also let them handle the selection-mode
class, whether they are assigned it or they descend from something in
selection mode.

Also drop setting the selection mode color for non-sidebar separators.

This is convenient when building a custom sidebar using a GtkSeparator
and to extend a sidebar to the title bar.
2018-09-10 15:50:43 +02:00
Adrien Plazas
a121bfa7ec Adwaita: Drop the background of nested headerbars
This is needed to work around headerbar sliding animation issues without
refactoring Adwaita's support of titlebars and headerbars as it may
break applications.

https://gitlab.gnome.org/GNOME/gtk/issues/1264
2018-09-10 15:49:37 +02:00
Jakub Steiner
02758cd48d Merge branch 'wip/adwaita/linked-entry-error-state-fix-master' into 'master'
Adwaita: Fix linked elements in error state

See merge request GNOME/gtk!315
2018-09-10 10:47:05 +00:00
Peter Simonyi
4e8c06eb7a win32 theme: Fix css syntax error 2018-09-07 08:31:22 -04:00
Alex Monday
3e5746356e themes: Fix linked elements in error state
Add instructions for color of linked elements border which ajoints
entry, when parent linked entry is in error state.
2018-09-02 14:48:53 +05:00
Daniel Boles
c9f1c56776 Adwaita: Regenerate CSS to get window.devel styles
This step was missed before, again.

SASS 3.6 emits rgba(0, 0, 0, 0) instead of transparent, so it wants to
change those too, but that patch was only committed in March and isn't
being backported to the previous stable, so I don't know if others'
versions will do the same - so until it's shown that anyone else (A) is
regenerating CSS and (B) also has 3.6, I'm skipping those changes. See:
c287f312ac
2018-09-02 09:27:38 +01:00
Adrien Plazas
a4790b7eaa Adwaita: Add color to separator.selection-mode
This makes separators to look good when separating two header bars in
selection mode.

https://gitlab.gnome.org/GNOME/gtk/issues/1286
2018-08-27 14:07:17 +02:00
Jakub Steiner
f8a971a7df Adwaita: devel style
- nightly/development versions of apps should get a styled
  headerbar.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/142
2018-07-30 12:09:41 +02:00
Daniel Boles
7030e08f9c Merge branch 'master' into 'master'
HighContrast: Restore expander size

Closes #1046

See merge request GNOME/gtk!167
2018-07-09 17:28:49 +00:00
Daniel Boles
14620423e8 themes: Restore default progressbar min sizes
The min size on the oriented axis used to come from style props with
default values in the source file, used if the theme did not provide a
min size in CSS. When the style props were removed, so was any notion of
a minimal size for proressbars' main axis, meaning that now progressbars
without expand or any other source of min size were just tiny specks.

The right place to do that was always the theme, so in our themes now,
fix that by copying the old default values for the style properties; see:

https://gitlab.gnome.org/GNOME/gtk/issues/1191#note_259393
https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/gtkprogressbar.c#L92

The result should be the same in that (A) the min size is now what it is
in GTK+ 3 & (B) an app/user can override the theme exactly the same way.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1192
2018-07-03 18:55:31 +01:00
Daniel Boles
55a1f8ccfd HC: merge dupe selectors; linebreaks for legibility 2018-07-03 18:55:17 +01:00
Daniel Boles
269a9d8528 Adwaita: Drop some unneeded overrides
The pseudoclasses work fine on the subnodes without having to also apply
`parent:class subnode`.
2018-07-02 22:04:35 +01:00
Daniel Boles
c892d2767a Adwaita: Regenerate CSS for text handle overhaul
Commit b3e91b7111 forgot this.
2018-07-02 22:04:35 +01:00
Samuel Thibault
bada3dbac6 HighContrast: Restore expander size
Expanders used to be 16px high. With the move from the gtk2 rendering
to gtk3 rendering they shrunk to 12px, making them hard to see, because
it's now the icon which is 16px high and the icon contains transparent
borders.

This makes the HighContrast theme use 24px icons instead, to restore
16px expanders. This may expander some containers a bit.

Closes #1046
2018-06-21 16:15:35 +02:00
Daniel Boles
9178423844 TreeView: Get expander size from CSS min-width|height
Rather than hard-coding this, get it from CSS. That way, themes will be
able to set larger expanders than a fixed 16 px, e.g. for accessibility.

See https://gitlab.gnome.org/GNOME/gtk/merge_requests/167
2018-06-21 15:49:00 +02:00
Carlos Garnacho
b3e91b7111 gtktexthandle: Update to gtk4 rendering/input
GtkTextHandle was neglected by whoever removed the ::draw signal,
leaving it entirely broken. Update to using GtkGizmo so we can
implement snapshot of text handles.

Input has received a revamp too, handling is done through a
GtkGestureDrag and coordinate calculations simplified by storing
the delta to the hotspot on ::begin instead of ::update, as this
value is constant throughout the gesture. Widget state management
on crossing events happens implicitly, so no longer needs to be
done here.

Last but not least, CSS has also been updated so handles are
rendered at the correct size and proportion, and with the padding
that code expects of it.
2018-06-21 12:54:03 +02:00
Daniel Boles
8aeced2c91 themes: Remove leftover bit of .linked workaround
Now that .linked acts like the .path-bar already did, there is no point
in applying the same styles again (with higher specificity).
2018-06-20 20:11:26 +01:00
Daniel Boles
cae382c829 themes: Regenerate CSS for recent commits
e.g. the box.linked one, which didn't update the compiled CSS.
2018-06-20 19:26:46 +01:00
Daniel Boles
0a5086d94f HC: Avoid excessive selectors from prev commit
The new rule does not need to affect all those other pseudoclasses. I
just put it in the wrong scope.
2018-06-20 19:26:41 +01:00
Daniel Boles
b103650cb0 HC: Avoid same BG/FG colors in flat treeview entry
Selected rows in tree views in HighContrast have a background colour the
same or nearly as the normal text colour, so we cannot let entries in
such rows have transparent backgrounds, or the text inside the entry
becomes nearly or totally impossible to see.

Dodge this by giving entry.flat inside treeview and with :focus the
$base_color, which is different from the text & so lets that be seen.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/125
2018-06-20 19:13:26 +01:00
Timm Bäder
64313f4a4b themes: Don't handle box.linked special
We don't reverse the css nodes anymore in RTL layouts.
2018-06-18 19:39:32 +02:00
Matthias Clasen
1104a8fdb7 Add an emoji completion popup
This widget provides entry completion-like functionality
for Emoji codes like 😁 or 💋.
2018-04-23 18:54:43 -04:00
Daniel Boles
5c152192d7 themes: Fix a new comment
bah.
2018-04-22 22:21:35 +01:00
Daniel Boles
b92e688141 themes: Fix swapped borders on RTL PathBar buttons
.linked assumes the container is a GtkBox, which is documented as never
flipping children in RTL, so :first-child is always the left child, etc.
GtkBox does that by reordering its CSS nodes when the direction changes.

But most widgets don’t do that, so :first|last-child are 1st/last ADDED
and swap sides in RTL. GtkPathBar is so, and ignoring that in our themes
meant that in RTL, its left/right buttons got each other’s borders. Yuk!

This patch adds the groundwork for supporting widgets like that, via the
%linked_flippable placeholder, and applies that to override buttons in
  filechooser .path-bar.linked > button
so that the correct borders get applied to those buttons when using RTL.

Note that I select only PathBars within a FileChooser because we also
have NautilusPathBar, which also uses widget.path-bar – but *does* flip
its nodes for RTL already, so letting that get affected broke it again!

https://bugzilla.gnome.org/show_bug.cgi?id=772817
2018-04-22 22:06:50 +01:00
Daniel Boles
70198e21ee themes: Make disabled Expander arrow look disabled
If GtkExpander:sensitive was FALSE, the arrow still got the normal fg
colour, which made it look clickable, in contrast to the adjacent label.
Fix this by adding selectors to catch the applicable :disabled states.

Note: Needing these may indicate an oops in generic styles elsewhere,
but I couldn’t see any, so let’s just get it looking right for now.

Close https://gitlab.gnome.org/GNOME/gtk/issues/146
2018-03-29 21:23:50 +01:00
Daniel Boles
6ad33a274b HighContrast: Honour .monospace set by GtkTextView
Copy the line that sets a monospace family from Adwaita (same place too)

noticed at https://gitlab.gnome.org/GNOME/gtk/issues/141#note_91610
2018-03-29 18:19:58 +01:00
Daniel Boles
0b8215e0b1 Adwaita: Regenerate CSS from SASS
https://gitlab.gnome.org/GNOME/gtk/merge_requests/66 introduced spurious
red/green fore/background.

Also, the GtkVideo stuff didn't get regenerated in.
2018-03-22 20:58:31 +00:00
Daniel Boles
563cb69c6d Merge branch 'toolbar-spacing-fix' into 'master'
theme: Be more selective when adding margins to toolbar items

See merge request GNOME/gtk!66
2018-03-22 20:54:01 +00:00
Benjamin Otte
7cf6da60da gtk: Add GtkVideo
GtkVideo is a simple video player widget. It probably needs some more
configurability, but it does its job.
2018-03-18 21:01:23 +01:00
Nikita Churaev
0f13a232c6 theme: Be more selective when adding margins to toolbar items
Only add margins to direct children of toolbar items, this fixes the
gaps between linked buttons inside custom toolbar items.
2018-03-18 13:33:52 +03:00
Timm Bäder
1b8a768279 adwaita: Move searchbar style to box child
This way, we avoid a 1px border at the bottom of the actual searchbar
widget and move it instead to the child of a GtkRevealer. Since we can
now use widgets with 0px height, we finally get rid of the 1px border
that was drawn even if the searchbar child was hidden.
2018-02-16 21:23:14 +01:00
Timm Bäder
b726f60f90 searchbar: reorganize
Avoid the ugly priv->tool_box==NULL check in ::add (and ::remove) by
just not using template xml for this small class. Also, make sure the
GtkBin child is properly set and implement remove to also properly
remove it. Remove the manual widget margins and add some CSS for it.
Also switch to simply using a GtkCenterBox.
2018-02-04 22:51:16 +01:00
Timm Bäder
32166a9595 adwaita: Regenerate proper CSS 2018-01-13 07:39:54 +01:00
Timm Bäder
d8f6b12685 tooltip: Remove excessive padding
tooltips support padding now, just like everthing else.
2018-01-12 22:34:22 +01:00
Timm Bäder
77769a52b3 adwaita: Add some spacing to the scale value
So the slider does not overlap the value label. Since the value label is
allocated at the widget edge in gtk3, the correct fix here would
probably be to remove the 12px padding we apply to the entire scale and
instead apply it only to the trough.
2018-01-10 10:11:31 +01:00
Timm Bäder
15b3f33965 adwaita: Fix scale styling for latest changes 2018-01-10 09:29:45 +01:00
Timm Bäder
0aca394a96 adwaita: Uncomment accidentally commented lines
The result looks wrong but the css looks right.
2018-01-08 17:44:37 +01:00
Daniel Boles
ab0edd1091 themes: missing specificity bump on expander arrow
Commit 4ee02725b4 made the :hover apply to
the title node, not the arrow node, but the selectors it added were not
caught by the recent commits fixing the specificity of title > arrow.
2018-01-01 21:22:23 +00:00