Commit Graph

447 Commits

Author SHA1 Message Date
Matthias Clasen
beeedb5141 aboutdialog: Set icon-size for the logo
Make it explicit that we want large icons here.
2021-01-11 17:50:05 -05:00
Matthias Clasen
1d40750a60 aboutdialog: Set a style class
Add the .aboutdialog style class to toplevel
widget of about dialogs, similar to what we
do for e.g. GtkAssistant.
2021-01-11 17:46:55 -05:00
Michael Catanzaro
2336120010 message dialog: use title style only if there is secondary text
If there is no secondary text, then the primary text is just a message,
not a title, and should not use title style.

This partially reverts 1e3ec7c1f9. The
message dialog nown looks like it used to in GTK 3. However, it's still
styled only using a style class rather than using pango markup, as in
GTK 3.

Fixes #3509
2020-12-29 11:15:14 -06:00
Jakub Steiner
daa5d5aead Merge branch 'dropdown-searchbar' into 'master'
dropdown: Improve search bar styling

See merge request GNOME/gtk!2948
2020-12-14 09:39:38 +00:00
nana-4
90355c0b27 emojichooser: Add .emoji-searchbar style class
Similar to .emoji-toolbar, it would be nice to have this for styling.
2020-12-14 05:26:13 +09:00
nana-4
538cf9e294 dropdown: Improve search bar styling
As per the mockup. See:

https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/dropdown-lists/dropdown-lists.png
2020-12-14 05:08:59 +09:00
Matthias Clasen
d69a943661 gtk: Remove <requires> from ui files
We don't need to check requirements for things
that are shipped *with* gtk.
2020-11-10 18:36:03 -05:00
Arnaud Bonatti
db6d7dccd8 Drop “gtk+” plus sign in GtkBuilder <requires>. 2020-11-07 16:16:55 +01:00
Matthias Clasen
3a119a3d3a dropdown: Make search entry shrink
We don't want the popup to be wider than the button
if we can help it. The search entry does not need
to be very wide.
2020-10-27 15:35:34 -04:00
Matthias Clasen
0c49f7349d Merge branch 'matthiasc/a11y-buildable' into 'master'
Implement accessible attributes for ui files

See merge request GNOME/gtk!2751
2020-10-27 18:13:44 +00:00
Matthias Clasen
13b9b9b7d8 scale: Set round-digits to -1 initially
This ensures that keybindings for small-step changes
work despite draw-value being FALSE now. This was
fallout from 8ca612c966 that showed up
as arrow keys not working anymore for the color scales
in the color chooser.
2020-10-25 00:31:18 -04:00
Matthias Clasen
313ba0280a color editor: Add accessible labels
Add some labels to the controls in this dialog.
2020-10-24 23:55:56 -04:00
Adrien Plazas
a17f33b1fe gtkaboutdialog: Directly specialize GtkWindow
As it doesn't act as a dialog, there is no point specializing GtkDialog,
so his makes it specialize GtkWindow directly.
2020-10-06 18:46:48 +02:00
Matthias Clasen
752270253f fontchooser: Fix builds without PangoFT2
Currently, only if PangoFT2 is present and used it is supported
to retrieve the languages that are supported by a particular font.

If we don't have PangoFT2, remove the language filtering and the
sample text selection.

Based on earlier work by Chun-wei Fan, see
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2614
2020-09-26 19:15:45 -04:00
Matthias Clasen
810218b2f5 fontchooser: Don't center the list
The centered layout of the font previews don't look appealing
and make it harder to judge the relative width and weight of
the individual styles.

Fixes: #3188
2020-09-23 16:32:48 -04:00
Matthias Clasen
a9bf129286 fontchooser: Don't show "No fonts" prematurely
Don't switch to the empty page while we are still busy
filtering. Fonts might yet appear.
2020-09-19 10:25:45 -04:00
Matthias Clasen
09604eb3eb fontchooser: Add user filtering
Add a popover that has filtering options. As a start,
allow filtering by monospace and by language coverage.
2020-09-19 10:13:36 -04:00
Matthias Clasen
76b5ff6a00 pagesetupdialog: Just use labels in check buttons
Check buttons lost their ability to hold general
content. And while that is maybe sad, the tiny
images here are not really useful anyway, and
should just go away.
2020-08-31 12:05:53 -04:00
Matthias Clasen
2c5c938f0d Clean up uses of gtk_toggle_button_get/set_active
Replace all uses on check buttons by the corresponding
check button api.
2020-08-30 21:23:25 -04:00
Matthias Clasen
d3042dabf4 printdialog: Make collate image smaller
This matches the appearance on GTK 3, and prevents
the checkbuttons next to the image from being spaced
out.
2020-08-30 17:59:23 -04:00
Matthias Clasen
830b2b7f30 printdialog: Fix radio groups
We need to use grouped checkbuttons now.
2020-08-30 17:59:23 -04:00
nana-4
19c2cc1296 placessidebar: Replace hard-coded margins with theme
So we can easily adjust the widget sizing in the theme.
2020-08-15 22:46:31 +09:00
nana-4
9b42edbef4 tooltip: Replace hard-coded margins with theme
So we can easily adjust the widget sizing in the theme.
2020-08-15 22:46:31 +09:00
Matthias Clasen
85c713127e aboutdialog: Make margins more uniform
Use similar margins in the Credits and System tabs.
2020-08-06 22:18:14 -04:00
Matthias Clasen
ed13e6a41e grid layout: Rename some properties
Rename GtkGridLayoutChild:left-attach/top-attach to
GtkGridLayoutChild:column/row. Update all users.

Fixes: #2967
2020-08-02 17:58:03 -04:00
Emmanuele Bassi
c63087a563 Remove ATK
To build a better world sometimes means having to tear the old one down.
        -- Alexander Pierce, "Captain America: The Winter Soldier"

ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:

 - it maps to a very specific implementation, AT-SPI, which is Linux and
   Unix specific
 - it requires implementing the same functionality in three different
   layers of the stack: AT-SPI, ATK, and GTK
 - only GTK uses it; every other Linux and Unix toolkit and application
   talks to AT-SPI directly, including assistive technologies

Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:

 - add an "accessible" interface, implemented by GTK objects directly,
   which describe the accessible role and state changes for every UI
   element
 - add an "assistive technology context" to proxy a native accessibility
   API, and assign it to every widget
 - implement the AT context depending on the platform

For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Matthias Clasen
0145809a94 filechooserdialog: Stop using ::response-requested
Replace the ::response-requested signal by an action.
2020-07-12 12:15:08 -04:00
Matthias Clasen
2746a2d929 filechooser: Drop the ::selection-changed signal
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 02:06:31 -04:00
Matthias Clasen
99a0b35705 filechooser: Drop the ::file-activated signal
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 01:40:08 -04:00
Alexander Mikhaylenko
7c3b30036e headerbar: Show title buttons by default
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
2020-07-02 23:51:16 +05:00
Matthias Clasen
e8210d5865 Add GtkStringList as public api
This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.
2020-06-23 16:11:46 -04:00
Matthias Clasen
5bcb01e182 pagesetupdialog: Convert the printer combo
Turn the printer combo into a dropdown.
2020-06-16 14:44:30 -04:00
Matthias Clasen
cf2d6f6ec5 dropdown: Style fixups
Make the dropdown popover have a .menu style class,
and add padding to the rows in the popover. Also,
make the popover left-aligned with the button.
2020-06-15 10:25:31 -04:00
Matthias Clasen
74ac435ae6 printdialog: Replace the papersize combo with a dropdown
This one is more complicated, since it involves
separators and a custom item.
2020-06-12 09:22:36 -04:00
Matthias Clasen
ed9941ec2c printdialog: Replace some combo boxes with drop downs
These are just the simple cases.
2020-06-12 08:49:01 -04:00
Matthias Clasen
933e373b07 dropdown: Make the stack nonhomogeneous
Without this, the (None) in the empty page forces
the button to have a large minimum width, even when
we don't put a widget in it.
2020-06-12 08:49:01 -04:00
Matthias Clasen
985b5a052e dropdown: Connect a forgotten signal handler
The code was exporting a search_stop function, but
the ui file didn't connect it to the ::stop-search
signal. Fix that.
2020-06-05 14:34:38 -04:00
Matthias Clasen
ebc07d1458 printdialog: Port to column view 2020-06-03 13:35:09 -04:00
Matthias Clasen
d3aad3b574 filechooser: Use a dropdown for the filter combo
Replace an internal use of GtkComboBox with GtkDropDown.
2020-05-30 19:31:38 -04:00
Matthias Clasen
371dab51bb Add GtkDropDown
This is a simple drop down control using list models.
2020-05-30 19:31:38 -04:00
Benjamin Otte
58b65d1bf6 fontchooserwidget: Port to listmodels
The port is kind of evil, in that it stores either a PangoFontFamily or a
PangoFontFace in the list, depending on if the fontchooser is configured
to select fonts or faces.
It also does not cache the font description anymore, so more calls to
pango_font_describe() may happen.

If both of these issues turn out problematic, the fontchooser would need
to resurrect GtkDelayedFontDescription again and put objects of that
type through the model.

These changes depend on Pango 1.46's introduction of listmodels and
various new getters, so the dependency has been upgraded.
2020-05-30 19:26:46 -04:00
Matthias Clasen
1cd71203b8 volumebutton: Enable the tooltips
Little point in having a query-tooltip handler if
we don't make sure ::query-tooltip is emitted.
2020-05-27 19:02:30 -04:00
Matthias Clasen
1927a8af71 tooltips: Fix a line wrap mishap
We don't want wrapping labels to cause tooltips to
have excessive height, so we need to set a reasonable
value for width-chars, without forcing short tooltips
into a full line length. Also be careful to respect
preexisting line breaks (we have such examples in
widget factory).
2020-05-27 19:01:46 -04:00
Matthias Clasen
bc6643f3c2 paned: Redo the api
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.

Update all users.

See #2719
2020-05-11 22:21:33 -04:00
Alexander Mikhaylenko
059cc3b818 video: Use more appropriate revealer transition 2020-05-07 01:21:26 +05:00
Matthias Clasen
b96509c030 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

See merge request GNOME/gtk!1828
2020-05-06 03:55:55 +00:00
Timm Bäder
de40b0b061 placesview: Remove frame
We don't need a double border here.
2020-05-05 08:20:09 +02:00
Matthias Clasen
0ec5a3f0d9 tooltipwindow: Derive from GtkWidget 2020-05-04 22:53:08 -04:00
Matthias Clasen
aae25c4fa0 combobox: Derive from GtkWidget
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.

See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
12ecbd1508 listboxrow: Derive from GtkWidget
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.

See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
9a65ed9ada window: Derive from GtkWidget
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.

Update the accessible implementation to match, remove
remnants of container implementations in GtkWindow
subclasses, and fix livecycle issues around destroy
vs dispose in GtkAssistant.

After this commit, using gtk_container_add on window
subclasses is not allowed anymore, but adding childing
with <child> in ui files still works.

See #2681
2020-05-04 22:53:08 -04:00
Alexander Mikhaylenko
43a453e465 headerbar: Remove has-subtitle property
Subtitle will go too in the next commit, but has-subtitle goes first as
it's broken right now anyway.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
422c78badf mediacontrols: Use tabular figures for time and duration
In particular, this prevents gtk4-widget-factory from jumping every
second.
2020-04-27 17:28:20 +05:00
Matthias Clasen
661b8c3d1a Merge branch 'matthiasc/for-master' into 'master'
css: Give none singletons unique names

See merge request GNOME/gtk!1718
2020-04-18 22:52:15 +00:00
Matthias Clasen
45bcffd637 statusbar: Don't use a frame
This frame serves no purpose anymore, and now that frames
draw frames, it shows up annoyingly.
2020-04-18 17:29:13 -04:00
Nelson Benítez León
2c7d54791c GtkPlacesSidebar: avoid location clicks to grab focus
Sibebar location rows should not grab focus on click.

Fixes filechooser issue #1469
2020-04-18 14:43:02 -04:00
Matthias Clasen
df1816a29c button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
47ac0db66c viewport: Drop shadow-type
The viewport draws a frame at the same place as
the scrolled window, so there is really no need
to have that ability in both. Just drop the frame
from viewports.
2020-04-17 10:57:36 -04:00
Matthias Clasen
edae2a8dc5 frame: Drop shadow-type
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
2020-04-17 10:57:36 -04:00
Matthias Clasen
285aa226e5 scrolledwindow: Drop shadow-type
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
4e6b62e564 emojichooser: link sections for keynav
Make Up/Down jump between sections in the Emoji grid.
2020-04-14 15:07:58 -04:00
Matthias Clasen
822c2aba36 scalebutton: Don't derive from GtkButton
Make GtkScaleButton a widget that has a toggle button
as a child, just like all the other button widgets now.
The immediate benefit of this arrangement is to avoid
the "double focus" problem when we pop up the popup.

Update accessible, demos and tests to match.
2020-04-09 20:43:45 -04:00
Matthias Clasen
2ae08e632c color editor: Make the sample non-focusable again
This is one of the situations, where can-focus can still
be used to tweak focus behavior of leaf widgets. Color
swatches are focusable by default to allow selecting colors
with the keyboard. But when used as color samples, they
should not take focus.
2020-04-09 17:50:29 -04:00
Matthias Clasen
7ca36cd2d4 Stop setting can-focus in ui files
None of these settings are necessary.
2020-04-09 17:50:29 -04:00
Matthias Clasen
173b1333ca printing: Avoid a crash
When no printer has been selected (e.g. because we don't
find any printers), the 'print at' radio group should be
insensitive, except for the 'now' choice. Selecting another
option in this situation will lead to a crash.
2020-03-28 15:36:15 -04:00
Matthias Clasen
784d6f8d0c printing: Fix initial page range radio group
Only set one radio button as active in the ui file.
Otherwise we end up with multiple options appearing
as selected initially.
2020-03-28 15:36:15 -04:00
Matthias Clasen
9d84996fea placesview: Stop using ::popup-menu
This signal is going away.
2020-03-25 23:14:45 -04:00
Matthias Clasen
844801580f colorchooser: Stop using ::popup-menu
This signal is going away. Use an action instead.
2020-03-25 23:14:44 -04:00
Benjamin Otte
43c0ea676d filechooser: Trigger the location popup via bindings
Simplifies code quite a bit.
2020-03-25 23:14:44 -04:00
Matthias Clasen
90197240d3 filechooser: Fix the file list popover
Make this popover work again.
2020-03-21 20:00:15 -04:00
Matthias Clasen
6555a2f661 filechooser: Fix the new folder popover
We were listening for change notification on a
no-longer-existing property.
2020-03-21 19:32:08 -04:00
Matthias Clasen
31db615885 Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18, reversing
changes made to 6ec96d2e98.
2020-03-19 18:03:16 -04:00
Matthias Clasen
53f29ba427 placesview: Stop using ::popup-menu
This signal is going away.
2020-03-19 00:54:23 -04:00
Matthias Clasen
eb3f4b302f filechooser: Stop using ::popup-menu
This signal is going away.
2020-03-19 00:24:53 -04:00
Matthias Clasen
f40965cc40 colorchooser: Stop using ::popup-menu
This signal is going away. Use an action instead.
2020-03-18 23:00:51 -04:00
Benjamin Otte
3cf56817e7 filechooser: Trigger the location popup via bindings
Simplifies code quite a bit.
2020-03-18 23:00:51 -04:00
Matthias Clasen
2ae3b46ee9 Stop setting type hints for dialogs 2020-03-11 19:36:04 -04:00
Matthias Clasen
b5bacb3be6 Drop the margin property
Replace it with margin-start, -end, -top, -bottom throughout.
2020-02-25 20:59:04 -05:00
Matthias Clasen
a9c05193a7 Drop the expand property
The hexpand and vexpand properties are sufficient.
2020-02-25 18:29:15 -05:00
Timm Bäder
b1d4d24c7b pathbar: Inherit from GtkWidget 2020-02-25 11:08:25 +01:00
Matthias Clasen
9d80db29de Merge branch 'spinning-spinner' into 'master'
Rename GtkSpinner::active to ::spinning

See merge request GNOME/gtk!1475
2020-02-25 04:04:46 +00:00
Matthias Clasen
e73a40733f Rename GtkSpinner::active to ::spinning
And add a setter and getter. The old name was
confusing with the widget state of the same
name. 'Active' is just too overloaded.
2020-02-24 22:37:02 -05:00
Matthias Clasen
a43d13aa74 popover: Drop ::relative-to
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).

This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
2020-02-24 20:46:41 -05:00
Emmanuele Bassi
ff6772fd98 Remove preview widget from GtkFileChooser
The preview widget harks from a platform before time, when we didn't
have GIO, or a thumbnail specification.

Very few applications use it correctly, if at all; it has an horrid hack
to deal with the ownership of the widget's instance when accessed
through the getter function; it messes up the layout of the widget and
its label is less than useful when it comes to file names longer than a
dozen characters; it's a poor substitute for a proper thumbnail view.
2020-02-22 16:39:01 +00:00
Emmanuele Bassi
ebd23737c0 Remove GtkPlacesSidebar:local-only
We don't use it any more in GtkFileChooserWidget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
6e699e3f04 Remove GtkPlacesView:local-only
We don't use it any more from the file chooser widget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
b09e7df81b Remove GtkFileChooser:local-only
Now that the whole API goes through GFile we don't have the weird split
between local-only and non-local-only modes.
2020-02-22 15:22:06 +00:00
Timm Bäder
faddbb18d3 emojichooser: Add style class to emoji toolbar
Closes #1013
2020-02-20 10:23:09 +01:00
Benjamin Otte
546a748cd8 widget: Replace style-updated signal with css_changed vfunc
1. Rename the thing
2. Turn it from a signal to a vfunc
3. Pass the GtkCssStyleChange to it

We don't export any public API about the GtkCssStyleChange yet, it's
just a boring opaque struct.
2020-02-05 02:46:13 +01:00
Alexander Larsson
6a15e9169d Rename GtkIcon widget to GtkBuiltinIcon
This is an internal widget whose name is not very important, and we
want to rename GtkIconInfo to GtkIcon, so lets rename this.
2020-01-30 10:53:33 +01:00
Benjamin Otte
afbff574f5 filechooser: Remove default size machinery
The FileChooser ToolKit (fctk) had its own machinery to handle default
sizes which was completely busted and trying to marshal random numbers
through the widget hierarchy that maybe made sense in 2012 but don't do
now.

Get rid of it, just keep the dialog's GSetting - which funnily enough
used to be written by the dialog but written by the widget.
But that's fctk for you.
2020-01-28 02:17:31 +01:00
Matthias Clasen
b9034015d7 filechooser: Convert to GtkDropTarget 2020-01-08 18:48:20 -05:00
Matthias Clasen
74722fb10e filechooser: Port to GtkDragSource 2020-01-08 18:48:19 -05:00
Matthias Clasen
f31a016efb tooltips: Stop using GTK_WINDOW_POPUP
Make GtkTooltipWindow a GtkNative implementation,
instead of using a GTK_WINDOW_POPUP window.
2019-12-29 22:09:13 -05:00
Matthias Clasen
e424246134 combobox: Replace GtkTreeMenu with a popover
This does not currently try to reproduce the exact
placement, since GtkPopover doesn't have to have
the necessary placement hints.
2019-12-29 18:45:40 -05:00
Matthias Clasen
9bbacd3e4c Run gtk-builder-tool simplify over our ui files
This was done mainly to verify that the tool does not
make any unwarranted changes. The changes included here
are all cosmetic.
2019-12-12 18:37:39 -05:00
Timm Bäder
2cd4b255cd placesview: open address popover upwards 2019-10-22 09:37:08 +02:00
Timm Bäder
4826255ea3 filechooserwidget: Rename a callback 2019-10-22 09:37:08 +02:00
Timm Bäder
d223752c55 infobar: Inherit from GtkContainer
infobars being a GtkBox doesn't make sense.
Also implement infobars without exposing internal children.

Closes #1957 because it adds the bottom border.
2019-09-09 17:36:25 +02:00
Timm Bäder
76e3284ca1 colorchooserwidget: Inherit from GtkWidget
No reason for this to be a GtkBox.
2019-08-03 14:44:24 +02:00