Commit Graph

374 Commits

Author SHA1 Message Date
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