Commit Graph

873 Commits

Author SHA1 Message Date
Jakub Steiner
416feacfe3 Merge branch 'adwaita-fixes-3' into 'gtk-3-24'
Adwaita: Fix errors in two recent MRs

See merge request GNOME/gtk!330
2018-09-10 19:07:26 +00:00
Adrien Plazas
f893e668c8 Adwaita: Fix sidebar separator styling
Simplify the styling of sidebar separators by not setting their borders
and margins rather than trying to drop it afterward, which was actually
not working anyway.
2018-09-10 15:05:22 +02:00
Adrien Plazas
a0acdcd08c Adwaita: Fix dropping the backgroud on nested headerbars
Make the selector less greedy to not remove the background on
non-titlebar headerbars contained in non-headerbar titlebars and only to
the ones contained in headerbar titlebars. This avoid issues in some
applications.

Also make dropping the background more agressive to actually remove it.
2018-09-10 14:54:19 +02:00
Jakub Steiner
6ab9a85ac9 Merge branch 'wip/adwaita/linked-entry-error-state-fix-3-24' into 'gtk-3-24'
Adwaita: Fix linked elements in error state

See merge request GNOME/gtk!316
2018-09-10 10:46:03 +00:00
Jakub Steiner
7e0aba77ff Merge branch 'selection-mode-ancestor-3' into 'gtk-3-24'
Adwaita: Set selection mode to headerbars if it's on ancestors

See merge request GNOME/gtk!325
2018-09-10 08:59:37 +00:00
Jakub Steiner
cbf76d4693 Merge branch 'separator-sidebar-3' into 'gtk-3-24'
Adwaita: Style separator.sidebar

See merge request GNOME/gtk!323
2018-09-10 08:59:04 +00:00
Adrien Plazas
43c458f45f 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-07 15:27:22 +02:00
Adrien Plazas
f0696dfae0 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-07 13:07:46 +02:00
Adrien Plazas
f9ba306116 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.

This is convenient when building a custom sidebar using a GtkSeparator
and to extend a sidebar to the title bar.
2018-09-07 12:42:26 +02:00
Alex Monday
e33b93a97e 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:43:13 +05:00
Jakub Steiner
8373b906d4 Merge branch 'expander-size-3' into 'gtk-3-24'
HighContrast: Restore expander size

See merge request GNOME/gtk!210
2018-07-09 15:27:51 +00:00
Samuel Thibault
660087db42 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-07-03 19:27:15 +02:00
Daniel Boles
1b8de2d5fa Adwaita: Drop some unneeded overrides
The pseudoclasses work fine on the subnodes without having to also apply
`parent:class subnode`.
2018-07-02 21:45:06 +01:00
Daniel Boles
b75b5e900a themes: Remove Raleigh
It has been extremely broken since the move to CSS gadgets/nodes, so
clearly no one is depending on it; nor does anyone seem to want to
resurrect it, and writing a Raleigh-inspired theme from scratch would be
faster if they did. So let's drop the dead weight from the build and lib

Now that we don't have Raleigh, the defaultvalue test has to be changed
to set Adwaita before checking the default values of style properties -
some of which Adwaita overrides in its CSS, meaning those would fail.
Not that it passed before anyway! But it does now after my other commit.

Note that I leave the last reference in gtk-zip.sh.in alone since that
hasn't been touched in 8 years and probably has plenty other problems...

Close https://gitlab.gnome.org/GNOME/gtk/issues/1187
2018-06-29 20:12:19 +01:00
Daniel Boles
934b40f4f3 EmojiCompletion: Use Box:spacing instead of CSS
master uses CSS border-spacing, but that is not available in GTK+ 3.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1166
2018-06-20 20:33:45 +01:00
Daniel Boles
7dbd3da2dd Adwaita: Don't use a property that GTK+ 3 lacks
border-spacing was not backported (yet?). If it won't be, then a
suitable replacement is needed. Until then, avoid the runtime error that
can result from using a nonexistent property in our theme.

https://gitlab.gnome.org/GNOME/gtk/issues/1166
2018-06-20 20:24:19 +01:00
Daniel Boles
848a524d95 Adwaita: Regenerate CSS for emoji completion popup
Commit 65bb238a3f forgot this bit.
2018-06-20 19:37:45 +01:00
Daniel Boles
7f91af2516 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:29 +01:00
Daniel Boles
4c61ff2a3a 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:15:21 +01:00
Matthias Clasen
65bb238a3f Add an emoji completion popup
This widget provides entry completion-like functionality
for Emoji codes like 😁 or 💋.
2018-06-03 09:43:28 -04:00
Daniel Boles
d35ecbb5a4 themes: Fix a new comment
bah.
2018-04-22 22:21:22 +01:00
Daniel Boles
a3cb26cad7 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:05:09 +01:00
Daniel Boles
154fa9817d 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.

https://gitlab.gnome.org/GNOME/gtk/issues/146
2018-03-29 21:00:00 +01:00
Daniel Boles
0102e0f914 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:16:57 +01:00
Daniel Boles
dbaaa701ad HighContrast: Regenerate CSS missing from !50
https://gitlab.gnome.org/GNOME/gtk/merge_requests/50 forgot this.
2018-03-22 21:01:08 +00:00
Nikita Churaev
ef3fe9ead3 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.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/66
2018-03-22 20:59:15 +00:00
Daniel Boles
f4bb394d60 _common.scss: Use : for properties in new comments
This is cosmetic and unlikely to have confused anyone, but still
2018-03-19 14:27:28 +00:00
Nikita Churaev
4e2f59ad23 Tidy up the search bar double border fix
Match "box" instead of "*", as already done for the search bar GTK4 and
for the action box in GTK3. Also clarify which widget property is
causing the margin which needs to be undone.
2018-03-09 22:13:01 +03:00
Nikita Churaev
b202c44fd8 Fix double borders in windows with a search bar in HighContrast 2018-03-08 00:57:59 +03:00
Nikita Churaev
d465d790f0 Fix the double border in windows with a search bar.
Includes applications like GNOME Software and GNOME Documents. The
search bar is a composite widget with a revealer inside it, and when the
content of the revealer is hidden, the border lingers. Changed the CSS
to add style to the content of the revealer instead of the search bar
widget itself.
2018-03-07 08:54:11 +03:00
Daniel Boles
8ed4b48b4c Adwaita: Fix typo lenght => length in SASS 2018-01-09 09:49:24 +00:00
Daniel Boles
bdb3a4d505 themes: Regenerate CSS to reflect recent commits 2018-01-01 19:52:47 +00:00
Daniel Boles
7dfb99c2ca HighContrast: Avoid expander↔combobox interference
as per commit b4b9aa1e5f
2018-01-01 19:46:58 +00:00
Matthias Clasen
b4b9aa1e5f Adwaita: Avoid expander<>combobox interference
Putting a combobox in an expander was causing the combo arrow
to go sideways. Increase the specificity with which we address
the expander arrow to avoid that.
2018-01-01 18:48:08 +00:00
Daniel Boles
40302a5268 Adwaita: Fix Entry:has-frame if backdrop/disabled
by explicitly including these in the selector removing the border, to
avoid other rules on these pseudoclasses overriding the .flat class.

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:35 +00:00
Daniel Boles
a03a3c3af9 HighContrast: Fix GtkEntry:has-frame not working
• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
• Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:34 +00:00
Daniel Boles
233f49ddcb Adwaita/README: Don’t bother mentioning parse-sass
Assume no one wants to make a change without testing it in GTK+…
If anyone has a reason to do this, they’ll be able to figure it out.
2017-10-08 14:08:34 +01:00
Daniel Boles
4515c72706 Adwaita/README: Update to reflect we use sassc now
We moved from the Ruby compiler to sassc in
commit 67953e9cfb, so this copies across
the updated info about building from GTK+ 4.

Also, explain the purpose of parse-sass.sh, since while that is not
mentioned in GTK+ 4 – and perhaps does not need to be, thanks to Meson –
we are still on Autotools here, and rebuilding the entirety of GTK+ 3 if
you only edited the CSS is a lot of waiting for no good reason.
2017-10-08 14:01:38 +01:00
Daniel Boles
26046c2afd HC: Avoid inflated titlebar separator in GEdit etc
It was selecting paned separator, which means any separator at any level
of descent within a paned, including the toplevel container in GEdit.

We need to be more specific and only select the relevant separator that
is the direct child of the paned. This is what Adwaita does.

https://bugzilla.gnome.org/show_bug.cgi?id=788573
2017-10-07 01:29:51 +01:00
Daniel Boles
fa04eb26d7 HC: Add border/hilight when hovering flat buttons
The border and icon highlight are useful feedback that was defeated by
CSS precedence. It worked for .titlebuttons due to their implementation,
but the same was not true for custom .flat buttons. This makes it so.

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:37:07 +01:00
Daniel Boles
61137ae163 HC: Flat titlebuttons became non-flat in backdrop
When the window was backdropped, they suddenly regained their border.
This was clearly not intentional or of any practical use to anyone.

Shuffle around some selectors so that the backdrop ones do not override
the flat ones and make the borders magically reappear when backdropped.

Note that, whereas standard titlebuttons get the border on :hover, other
.flat buttons in the headerbar do not. That should probably be fixed too

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:36:52 +01:00
Daniel Boles
6c3d17b867 HighContrastInverse: Make window borders visible
They were hard-coded to a transparent black, but that is our bg colour
in HC Inverse, so windows stacked on top of each other or a dark
background blended together into a mush.

Fix this by making the $_wm_border* colours relative to the fg colour,
so that HighContrastInverse gets borders that are transparentised white.

https://bugzilla.gnome.org/show_bug.cgi?id=788575
2017-10-06 00:38:13 +01:00
Daniel Boles
3a0ea4e0d2 HC: Fix MessageDialog’s rounded bottom borders
A missing decoration selector meant that we got a solid black background
behind the rounded corners of the dialog.

Copy the equivalent code from Adwaita, including nicely rounding the
focus outline too (& sorry, but this needs more newlines to be readable)

https://bugzilla.gnome.org/show_bug.cgi?id=788574
2017-10-06 00:25:58 +01:00
Daniel Boles
d9df5dfa74 HighContrast: Fix titlebar containing >1 headerbar
by migrating the relevant code from Adwaita, to dodge unwanted doubling
up of the bottom border and such.

It also hopefully still encompasses whatever commit
b4371728de was trying to do; certainly, it
retains the resolution of the main bug/patch that one was attached with.

https://bugzilla.gnome.org/show_bug.cgi?id=769877
2017-10-05 21:49:11 +01:00
Daniel Boles
8abdbfee16 HC: Copy working tooltip code from Adwaita & tweak
There were various problems, like only selecting on .tooltip and not the
widget node tooltip, not being specific enough for tooltip.csd, etc. So,
specific theming was absent, and default popup window styles got applied

This commit copies in the better working tooltip CSS from Adwaita, but
applies a couple of changes to make it work better in the HC themes:
 • Reduce the transparency of the tooltip, so we achieve higher contrast
 • Drop the black text-shadow, as it is not useful on this more black bg

Note: we may then need to re-add some of this to the .tooltip class. But
it is unclear what needs done there. While Adwaita is not doing it, we
are better not to confuse by keeping it in HC only; we should try to be
as close as possible, to make it easier for HC to keep up with Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 19:41:00 +01:00
Daniel Boles
b0e18d676e HighContrast: Correctly select window decoration
We need

    .window-classes decoration

but within the decoration parent selector, we were doing
&.window-classes, which gave us

    decoration.window classes

We need to fix this by selecting on .window-classes &

https://bugzilla.gnome.org/show_bug.cgi?id=788496
2017-10-05 00:27:39 +01:00
Georges Basile Stavracas Neto
7ab6dd64de theme: Fix Adwaita headerbars
We were not detecting correctly the cases where we should have
a rounded or a squared headerbar.
2017-10-04 14:46:02 -03:00
Daniel Boles
77401118c2 Adwaita: Fix typo .backgrounf => .background 2017-10-04 15:43:21 +01:00
Marco Trevisan (Treviño)
c91a4f31f0 HighContrast: set min-height for headerbars
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-03 22:26:36 -04:00
Marco Trevisan (Treviño)
b4371728de HighContrast: don't select .titlebar when is an headerbar
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-03 22:26:36 -04:00