Commit Graph

1388 Commits

Author SHA1 Message Date
Corey Berla
182cc74834 calendar: Add css style for marked days
As part of a6f9052cf1, marked days lost
their style, essentially making that function worthless.  Previously,
they were simply bolded, but that doesn't give them proper justice.
2023-01-06 20:21:35 -08:00
Georges Basile Stavracas Neto
8cf9810240 pathbar: Reimplement using GtkBox
The path bar does a lot of manual management of buttons, mostly to
be able to show navigation arrows when there's not enough space to
show the full path.

Since the GTK4 migration, this is slightly broken in some cases, due
to the 'need_sliders' variable being always set to TRUE. Furthermore,
after the introduction of the Recent button as a special cased fake
root, the allocation of the buttons is generating warnings.

Reimplement the path bar as a GtkBox, inside a GtkScrolledWindow.
This mimics what Nautilus does, and allows us to make navigation more
predictable, and remove most of the complexity from GtkPathBar. It
also prevents it from generating allocation warnings.

The path bar itself now doesn't override GtkWidget.measure nor
GtkWidget.allocate; instead, it delegates layout to the GtkBinLayout
layout manager.

CSS is adjusted to account for the changed hierarchy of buttons.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
f0a76f2ca8 filechooserwidget: Improve grid cell visuals
Use a GtkLabel instead of a GtkInscription to get filenames better
displayed within the available space.
2022-12-13 14:45:15 -03:00
Sam Hewitt
aabb8dce91 filechooser: Add hover styles to the gridview children 2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
ce12ab8307 style: Improve filechooser grid view slightly 2022-12-13 14:45:15 -03:00
Matthias Clasen
0370979225 theme: Fix up padding for the file chooser
We need the padding inside the filelistcell, so that
its event controllers cover the whole area.

Introduce a .complex style class for columnviews that
achieves that, and make the filechooser use it.
2022-10-21 08:28:58 -04:00
Jakub Steiner
a96c75ff02 stylesheet: sync combox with other popovers
- use the same lists style as everything else (menus, sidebars ...)

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5221
2022-10-03 15:43:07 +02:00
Jakub Steiner
be6413b0e7 theme: tone down unfocused title labels
- mimic libadwaita in toning down unfocused titles. Cargo culting the
  filter instead of using normal opacity property.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4468
2022-09-23 17:01:24 +02:00
Jakub Steiner
09176fc1b3 HC: entry - make hints italic
- to keep contrast but indicated difference between a value and a hint

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5143
2022-08-29 11:58:29 +02:00
Jakub Steiner
6776c21350 theme: selectable labels legibility
- don't set fg color for selections

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5017
2022-06-29 21:40:30 +02:00
Jakub Steiner
dd9f26c492 HC: make selected items better visible
- follow libadwaita's example and outline selected items for better visibility
  in high contrast variant

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4984
2022-06-15 14:47:47 +02:00
Alexander Mikhaylenko
0f7d93492d theme: Redesign color scales
See https://gitlab.gnome.org/GNOME/libadwaita/-/issues/469

Since this style needs changes in color scales themselves, it makes sense
to have it in GTK as well.
2022-05-12 02:22:52 +04:00
Matthias Clasen
19fa7d513d theme: Fix editable label selection
When the editable label is in editing mode,
selections should appear the same as in other
entries.
2022-05-05 12:44:40 -04:00
Matthias Clasen
0ea3dcacb0 theme: Fix vertical spin button selection
The selection should be black-on-blue as it is
everywhere else now. This was just a leftover.

Fixes: #4788
2022-04-19 23:14:37 -04:00
Christian Hergert
b726a2d902 Default: avoid use of opacity for overlay scrollbars
If using the opacity CSS property the renderer cannot optimize these
handles without the use of offscreens due to the use of both a border
and rgb render node.

Instead, we can apply the alpha to the color values and get the same
effect in a way that the GL renderer can optimize without the use of
offscreen textures for a sizeable reduction in runtime overhead.
2022-03-21 22:10:23 -07:00
Christian Hergert
e38e8ed73e css: reduce overdraws from "textview > text"
This was causing us to draw the same background content twice which is a
significant amount of bits to flip in the GPU for maximized windows,
especially twice.
2022-02-11 23:06:16 -08:00
Jakub Steiner
1f1aafd5c2 style: legible text selections
- follow adwaita styling

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4664
2022-02-01 17:12:52 +01:00
Joonas Henriksson
b4d0235a05
theme: Fix incorrect border color for tiled windows 2022-01-27 06:08:40 +02:00
Joonas Henriksson
a5d1f78bf2
theme: Fix drop shadow for tiled windows
Misplaced curly bracket prevented the :backdrop styling from getting
applied. Also fix the indentation while at it.
2022-01-27 05:50:06 +02:00
Matthias Clasen
a4760bcff7 Merge branch 'toolbar-combobox' into 'main'
Don't make all buttons in toolbars flat

Closes #4384

See merge request GNOME/gtk!4103
2021-12-17 00:35:18 +00:00
Jakub Steiner
d74e62886c selections: have unfocused state
- text selections for unfocused elements - textview, label, entry,
  spinbutton

fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4393
2021-12-10 12:00:12 +01:00
Jakub Steiner
d8505f09eb Revert "styling: Have unfocused selections"
This reverts commit 96f63a6bf3.
2021-12-10 11:36:10 +01:00
Jakub Steiner
96f63a6bf3 styling: Have unfocused selections
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4393
2021-11-03 13:08:01 +01:00
Matthias Clasen
031c37c7b0 theme: Remove GtkToolbar remnants
We don't ship a widget with css name 'toolbar'
anymore, so don't waste selectors on it.
2021-10-29 11:51:18 -04:00
Matthias Clasen
860821114a Don't make all buttons in toolbars flat
When a combobox is put in a toolbar, we don't want
its button to lose its border.

Fixes: #4384
2021-10-29 11:51:18 -04:00
Timm Bäder
03d4ac1863 theme: enable tabular numbers in GtkCalendar
It aligns numbers a lot so this makes sense.
2021-10-17 11:12:14 +02:00
Jakub Steiner
ed679703b8 theme: make toggled tbuttons in toolbars visible
- do what Alex does in libadwaita

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4264
2021-09-16 12:47:26 +02:00
Alexander Mikhaylenko
8b48cf11f9 menubutton: Support custom children
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4205
2021-09-03 17:52:46 +05:00
Alexander Mikhaylenko
ac3b246858 menubutton: Add a way to always show arrow with image buttons
Make sure the button still has the .image-button style class with an icon,
also add it to the initial state with only an arrow. Add a new
.arrow-button style class for the icon+arrow state so it's possible to
style it.

Remove spacing from the label+arrow variant to match, re-add it from the
stylesheet for both.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3501
2021-06-24 23:12:26 +05:00
Alexander Mikhaylenko
4f16e661cf theme: Specificity bump for dropdowns
Fix a fallout from d56711b5d8
2021-05-17 23:26:08 +05:00
Alexander Mikhaylenko
435a8f6337 theme: Fix GtkActionBar spacing 2021-05-09 17:01:36 +05:00
Alberts Muktupāvels
f89bad7f33
theme: fix solid-csd style
Move .solid-csd style out of .csd parent and adjust it so windows
look similar / same to GTK 3 windows:
- 4px padding.
- extra shadow.

https://gitlab.gnome.org/GNOME/gtk/-/issues/3879#note_1086351
https://gitlab.gnome.org/GNOME/gtk/-/issues/3879#note_1086377
2021-04-20 22:02:10 +03:00
nana-4
c6483d431f theme: Use -gtk-icon-filter for full-color icons
Not for symbolic icons.

Don't apply `-gtk-icon-filter: opacity(0.5);` to the symbolic icons as
they already have the "gray" colors indicating the disabled state.
Symbolic icons can be styled using the `color` property.

Also remove the obsolete comment.
2021-04-15 18:39:08 +09:00
Chris Mayo
ffa9814dd0 button: Style .keyboard-activating on frameless buttons
The use of the keyboard-activating CSS class for buttons was added
in [1], but the style did not apply to buttons with has-frame=FALSE.

[1] 00923615f4 ("button: Add back visual feedback for keynav", 2021-04-01)
2021-04-02 19:24:51 +01:00
Matthias Clasen
469228fcd7 Merge branch 'theme-reorg' into 'master'
Reorganize our themes

See merge request GNOME/gtk!3079
2021-04-02 03:02:49 +00:00
Matthias Clasen
00923615f4 button: Add back visual feedback for keynav
We lost the visual feedback for activating a button
via Space or Enter when the :active pseudo-state became
managed. Bring it back with a style class.

Fixes: #3813
2021-04-01 18:38:11 -04:00
Matthias Clasen
0dcf95b898 Reorganize our themes
Rename the included theme to Default, with 4 variants:
light, dark, hc, hc-dark. This replaces Adwaita,
Adwaita:dark, HighContrast and HighContrastInverse.
We still make the themes available under these names,
and we still set up Adwaita-dark and HighContrastInverse
as the dark variants of Adwaita and HighContrast.

The unification of the theme variants under Default
is not quite perfect; it would be nice to merge
the assets/ and assets-hc/ subdirectories and render
all assets from a single svg file.
2021-04-01 11:42:17 -04:00
Alexander Mikhaylenko
0942e863f2 Adwaita: Use transparent black for window border in dark too
Avoid smear when the background behind the window is dark. Adjust opacity
to make it appear roughly the same as before on white background.
2021-03-05 22:59:25 +05:00
Jakub Steiner
11d6f2ddd0 Adwaita: Regular focus ring for sidebar rows
- style sidebar rows as regular items like buttons wrt focus
- define transition as part of the focus-ring(),
  only animate outline related properties rather than `all`

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3708
2021-03-05 17:45:58 +01:00
Alexander Mikhaylenko
aa693159dc adwaita: Remove the nested headerbars hack
We clip the window now, it's not necessary anymore.
2021-03-03 17:35:15 +05:00
Alexander Mikhaylenko
5fef637e84 adwaita: Remove headerbar sheen on backdrop
It's gone from active windows since c9807f5afe,
but was still there in backdrop.
2021-03-03 17:34:22 +05:00
Jakub Steiner
edcd4c6207 Adwaita: control surface for resize tiled windows
- window resizing control area is implemented as where the shadows are drawn
- create a 'fake' shadow for the tiled case to allow easier resizing of
  the tiled window ratio even if it's offset to the side of the border

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3670
2021-02-16 14:10:14 +01:00
Jakub Steiner
67b5a34bad Adwaita: Avoid fine-tune scrollbars jumping
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3672
2021-02-16 11:59:45 +01:00
Matthias Clasen
6b3c356eb7 Merge branch 'wip/jimmac/larger-smaller-scrollbar-gtk4' into 'master'
Adwaita: Scrollbar transitions and size

Closes #1886

See merge request GNOME/gtk!3204
2021-02-15 18:06:00 +00:00
Jakub Steiner
5c5cd34c2f Adwaita: Scrollbar transitions and size
- tone down the size of the controller again
- transition between the indicator and control fluidly

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1886
2021-02-15 12:25:09 +01:00
Jakub Steiner
f953dfef11 Adwaita: bring borders for tiled
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3661
2021-02-11 15:16:57 +01:00
Jakub Steiner
da64856f37 Adwaita: don't cast shadows for halt-tiled windows
- while the case of a single half tiled window casting shadow is valid,
  the main use case for half tiled windows is when they have a neighbor.
  The :backdrop should be enough of a focus indicator and we avoid shadow
  casting on neighbors that are on the same Z level.
2021-02-09 18:57:31 +01:00
Christian Hergert
461fe36707 adwaita: disable shadows when window is maximized or fullscreen
These shadows cause a significant draw performance drop for maximized
windows. Disabling them increases the chances we can have faster scroll
performance of text.

There is some risk here for systems where they have a dock and you expect
the shadow to draw beneath that dock for transparency reasons.
2021-02-09 09:27:22 -08:00
Jakub Steiner
289bf078bf Adwaita: allow suggested and destructive action buttons in lists
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3643
2021-02-03 23:15:30 +01:00
Matthias Clasen
1cebc4316b Allow circular menubuttons
Fixes #3523
2021-01-26 00:20:23 -05:00