Matthias Clasen
7a2400c8a1
widget-factory: Fix the toggle buttons on page 3
...
They should not both be active initially.
2020-09-14 11:19:39 -04:00
Matthias Clasen
8f593827cf
widget-factory: Fix error states demo
...
Fix a corner case of input validation in the settings
dialog.
2020-09-13 00:17:19 -04:00
Matthias Clasen
b98352de3e
widget-factory: Stop using radio buttons
...
Use grouped toggle buttons for the view switcher
on page 2.
2020-08-30 22:17:31 -04:00
Matthias Clasen
e21b6a5721
widget-factory: Fix up radio buttons
...
Keep calling them radiobutton, since that is what they are.
And make the insensitive second group of three match what
we have in gtk3-widget-factory, and be parallel to the
insensitive checkbuttons next to it.
2020-08-30 17:59:23 -04:00
Timm Bäder
1375fb4464
Change button hierarchy
...
A radiobutton without indicator is really just a togglebutton with a
group.
A radiobutton with indicator is really just a checkbutton with a group.
Make checkbutton its own widget not inheriting from GtkButton.
GtkRadioButton could be removed but it stays for now.
Radiobutton && !draw-indicator => Togglebutton
Checkbutton && !draw-indicator => Togglebutton
Radiobutton && draw-indicator => CheckButton + group
2020-08-29 16:46:28 +02:00
Ahmed Eldemery
86acb13057
fix position of radiobutton1
2020-08-23 17:39:17 +02:00
Matthias Clasen
936f3f1ad9
Explicitly set grid positions in the ui file
...
We were outsmarted by a combination of gtk-builder-tool
removing default values and GtkGrid guessing good values
for omitted properties.
Fixes : #3080
2020-08-21 16:22:59 -04:00
Jakub Steiner
dd2e1e4867
Merge branch 'wip/jimmac/rich-list-styling' into 'master'
...
Adwaita: rich-list styling
See merge request GNOME/gtk!2456
2020-08-20 20:58:31 +00:00
Jakub Steiner
5f630481db
Adwaita: rich-list styling
...
FIXME: why is the second list in Demo>List Box>Controls taller?
https://gitlab.gnome.org/GNOME/gtk/-/issues/3073
2020-08-20 19:39:18 +02:00
Matthias Clasen
8acd60fda9
widget-factory: Improve the error states example
...
Elaborate the error state handling, and make it show
delayed states in GtkSwitch too.
2020-08-19 13:22:44 -04:00
Matthias Clasen
d1b1b5bd9b
widget-factory: Use rich-list style
...
Use the .rich-list style for the listbox on page 2.
2020-08-13 16:30:22 -04:00
Matthias Clasen
e9afb63a01
widget-factory: Add more error states
...
Add a label with the .error style class in the
configuration dialog, also add another entry validation
here, to have it in one place.
2020-08-13 07:40:54 -04:00
Matthias Clasen
94696490dc
widget-factory: Add an entry with error state
...
Enter the wrong thing into the age entry for seeing
error states.
2020-08-12 13:26:46 -04:00
Matthias Clasen
56afa05b97
widgetfactory: Create the dialog every time
...
Trying to work around gtk_show_about_dialog() is
not worth it, just recreate the dialog from scratch.
Fixes : #3047
2020-08-08 11:48:32 -04:00
Matthias Clasen
87a8fda163
demos: Brush up about dialogs
...
Show OS info, and generally polish this here and there.
2020-08-06 22:17:36 -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
Matthias Clasen
ad3514216d
Update our appdata files
...
Mention the new release in all our appdata files.
2020-07-29 17:58:45 -04:00
Timm Bäder
b213b01200
widget-factory: Remove useless separators
...
They don't serve a purpose and are not relevant for theming purposes.
2020-07-28 06:14:45 +02: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
Benjamin Otte
3078b180fe
Replace "gdouble" with "double"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d375dce9f5
Replace "gchar" with "char"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba
Replace "gint" with "int"
2020-07-25 00:47:36 +02: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
818b7c44be
widget-factory: Make the print dialog more functional
...
Allow opening the papersize dialog.
2020-06-13 08:59:21 -04:00
Matthias Clasen
1f4130b927
widget-factory: Add a mnemonic conflict
...
Make Alt-e the mnemionic for both the Edit menu
and the Select button on page 2. This shows that
mnemonic cycling doesn't currently work, we always
open the menu.
2020-05-28 08:34:06 -04:00
Yuri Chornoivan
01bd4cc4e1
Fix minor typos
2020-05-28 11:00:03 +03:00
Matthias Clasen
3035bf1e39
widget-factory: Cosmetics
...
Add a frame around the white background in the background
selection dialog. Otherwise, it is not really visible.
2020-05-16 21:54:14 -04:00
Matthias Clasen
102e7d0838
widget-factory: Ensure we have some backgrounds
...
The flowbox demo is otherwise less than useful,
if /usr/share/gnome/backgrounds isn't present.
At the same time, give the scale in the listbox
some function.
2020-05-14 00:28:03 -04:00
Matthias Clasen
ce949c0f25
widget-factory: Cosmetic changes
...
Change which rows in the listbox on page 2 are activatable,
and trigger a dialog. It did not really make sense that this
would happen when clicking on the spin button to focus it.
2020-05-13 19:22:31 -04:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
cd0081d08a
Use gtk_window_destroy
...
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Alexander Mikhaylenko
efe21869fb
widget-factory: Remove duplicate margin-start
2020-05-07 01:29:33 +05:00
Alexander Mikhaylenko
2f898e8bb9
widget-factory: Align spinbutton in the list on page 2
2020-05-07 01:29:20 +05:00
Matthias Clasen
0070cff32d
widget-factory: Use symboli icons in the toolbar
...
That is the style that is commonly used nowadays, even
in traditional apps.
2020-05-05 10:45:47 -04:00
Matthias Clasen
88e890c29c
widget-factory: Remove unused css
...
We no longer show the various frame styles.
2020-05-05 10:45:47 -04:00
Matthias Clasen
8bd2043a40
widget-factory: Add .toolbar
...
We dropped GtkToobar, but we still want to present
something that looks the part here, so add a style
class.
2020-05-04 10:50:34 -04:00
Matthias Clasen
e393465fd7
widget-factory: Fix a typo
...
We wanted to move the conflicting global shortcuts
to the bubble phase, so they don't override the
entry bindings.
2020-05-01 14:24:21 -04:00
Matthias Clasen
b1bedbc71a
widget-factory: Improve demo keynav
...
We have example cut/copy/paste actions for which we want
the usual shortcuts to show up in the menus, but they should
not break the expected shortcuts in entries. So, move them
to a capture phase shortcut controller.
2020-04-30 20:08:15 -04:00
Matthias Clasen
f31c85ff99
widget-factory: Add mnemonics to the stack pages
2020-04-30 19:18:09 -04:00
Matthias Clasen
ccb890f065
Use a slightly larger version of the logo animation
...
This is large enough to not make the media controls
slider shrink to nothing.
2020-04-28 14:00:52 -04:00
Matthias Clasen
80185b0f2a
widget-factory: Enable page transitions by default
...
No need to make this an easter egg.
2020-04-27 14:33:07 -04:00
Matthias Clasen
a3368ab7e9
widget-factory: Revamp transition effects
...
Use a quick crossfade for the main pages, and use
the rotation for the small stack on page 2, where
it looks less out of place.
2020-04-26 22:30:34 -04:00
Matthias Clasen
af2903d263
widget-factory: Improve the textview on page 3
...
Remove an extra frame, make the buttons linked, and
add tooltips.
2020-04-26 21:13:16 -04:00
Matthias Clasen
9ca2a09427
widget-factory: Move the password entry
...
Move the password entry to the other entries. That
fits the overall organization better, and makes all
the typographical styles fit.
2020-04-26 20:54:09 -04:00
Matthias Clasen
50b930fb1c
widget-factory: Make the list on page 2 grow to the bottom
...
Add a few more items to the list to make it fill up the space.
2020-04-26 20:35:51 -04:00
Matthias Clasen
3ed285ab71
widget-factory: Show typographical style classes
...
This nicely fills the gap on page 1.
2020-04-26 20:25:11 -04:00
Matthias Clasen
1bdaa99347
widget-factory: Include pango version in about dialog
...
This is useful information.
2020-04-26 20:01:31 -04:00
Matthias Clasen
ad22c463b8
widget-factory: Add a password entry
...
Thats a new widget that was missing.
2020-04-26 19:34:36 -04:00
Matthias Clasen
9f579edfdb
widget-factory: Put a video widget in
...
The designers wanted the frame column gone for a long
time, since inset/outset/groove etc are not the coolest
features anymore.
Keep one frame, and put a GtkVideo in it.
This opens up some real estate on page 1. Suggestions
welcome for how to fill it.
2020-04-26 14:08:40 -04:00
Matthias Clasen
f6af2d63b0
widget-factory: Implement the print action
...
Implement enough here to show a print dialog.
2020-04-26 14:08:35 -04:00
Matthias Clasen
8de774dde1
widget-factory: Make print a window action
...
We want to pass the parent window when opening
a print dialog, so this is naturally a window
action.
2020-04-26 10:45:40 -04:00
Matthias Clasen
8410e6f129
widget-factory: Some cosmetics
...
Hook the Print button on page 3 up to the app.print
action. This doesn't do anything now, but we might
use it to show a print dialog.
2020-04-26 10:02:11 -04:00
Matthias Clasen
ecf8e6f692
widget-factory: Improve the layout on page 3
...
Make the entries in the third column expand,
to align things.
2020-04-26 10:00:14 -04:00
Matthias Clasen
6f7bd37aeb
widget-factory: Update copyright year
2020-04-26 00:45:06 -04:00
Matthias Clasen
02fa948914
widget-factory: Improve the theme selector
...
Implement the "Current style" choice using
gtk_settings_reset_property, so we go back to
following the settings changes.
2020-04-24 21:12:20 -04:00
Matthias Clasen
250036259a
widget-factory: Make color swatches non-focusable
2020-04-18 03:29:13 -04:00
Matthias Clasen
416d82c81e
widget-factory: Add a menu section title
...
If you can't see it, you can't theme it.
2020-04-17 13:29:56 -04:00
Matthias Clasen
12d5fdd457
menubutton: 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
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
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
3469a63453
widget-factory: Use a model for the complex menu
...
We had the model already in the ui file, but weren't
using it.
2020-04-17 09:07:17 -04:00
Matthias Clasen
4a20a3fdb2
widget-factory: Catch errors
...
This speeds up the debugging when doing quick experimental
changes to widget-factory.ui.
2020-04-17 08:55:56 -04:00
Matthias Clasen
b072ad9993
widget-factory: Add menu style class in popovers
...
We have a hand-rolled popover menu on page 3 that looks
really bad right now. Adding the menu style class makes
it all better.
2020-04-15 11:36:09 -04:00
Matthias Clasen
394ea32e93
Use gtk_widget_add/remove_css_class more
...
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -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
0b17658a82
Replace most uses of <Primary> with <Control>
...
The only place where we are still using <Primary> is
in tests, to ensure we keep parsing it. Otherwise,
<Control> is now the preferred syntax.
2020-04-06 17:05:52 -04:00
Matthias Clasen
f2d6a7b36a
demos: Remove can-focus from ui files
2020-04-04 00:28:34 -04:00
Jakub Steiner
e9082fd9f3
widget-factory: avoid the T word
...
- style variant sound more appropriate
2020-03-30 14:28:47 +02:00
Matthias Clasen
5d07a66d1d
widget-factory: Fix the radio button example
...
We only want one of the sensitive buttons to be active,
so don't tell them all to be active.
2020-03-27 16:06:03 -04:00
Matthias Clasen
8ab2e31b58
widget-factory: Add theme switch
...
Add a submenu to test the builtin themes. This is mainly
for the benefit of the artists working on those themes.
2020-03-26 13:51:59 -04:00
Timm Bäder
3c28f6d891
demos/widget-factory: Add common_cflags to build
...
And fix the generated warnings
2020-03-06 18:56:40 +01: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
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
Benjamin Otte
1363cacb3a
widget-factory: Get rid of toolbars
2020-02-07 14:08:08 +01:00
Chun-wei Fan
69ed4c90e5
demos/widget-factory/widget-factory.c: Include stdlib.h
...
Include it for exit().
2020-02-03 17:18:36 +08:00
Matthias Clasen
a6f300cefd
widget-factory: Add a way to quit automatically
...
This can be used to measure startup cost in tests.
2020-01-21 17:31:48 -05:00
Matthias Clasen
62e9ea412a
widget-factory: Remove the menubar
2019-12-29 18:44:26 -05:00
Matthias Clasen
24c66f831f
widgetfactory: Undo more builder-tool damage
...
The two volume buttons are supposed to be
vertically arranged.
2019-12-24 09:59:23 -05:00
Matthias Clasen
4470e5bc93
gtk-demo: Some touchups
...
Make the theming style classes demo look a bit less odd.
2019-12-12 18:46:53 -05:00
Benjamin Otte
f8a7f30a0d
builder: Add GtkBuilderScope
...
GtkBuilderScope is an interface that provides the scope that a builder
instance operates in.
It creates closures and resolves types. Language bindings are meant to
use this interface to customize the behavior of builder files, in
particular when instantiating templates.
A default implementation for C is provided via GtkBuilderCScope (to keep
with the awkward naming that glib uses for closures). It is derivable on
purpose so that languages or extensions that extend C can use it.
The reftest code in fact does derive GtkBuilderCScope for its own scope
implementation that implements looking up symbols in modules.
gtk-widget-factory was updated to use the new GtkBuilderCScope to add
its custom callback symbols.
So it does it different from gtk-demo, which uses the normal way of
exporting symbols for dlsym() and thereby makes the 2 demos test the 2
ways GtkBuilder uses for looking up symbols.
2019-12-12 19:39:23 +01:00
Matthias Clasen
41bb40feee
widget factory: Fix more grid layout fallout
2019-12-09 21:29:03 -05:00
Matthias Clasen
da063a8aa5
Fix up widget-factory ui
2019-11-29 08:34:09 -05:00
Matthias Clasen
be74be0e3b
widget-factory: Fix a popover menu
...
This one is manually constructed, and things have
changed enough for that to break. Fix it up.
2019-11-27 17:41:44 -05:00
Benjamin Otte
b025ee428c
builder: Connect signals automatically
...
gtk_builder_connect_signals() is no longer necessary, because all the
setup that made it necessary to have this extra step is now done
automatically via the closure functions.
2019-11-22 17:42:31 +01:00
Benjamin Otte
27d05102ab
builder: Remove user_data argument from gtk_builder_connect_signals()
...
This is pretty unused and gets in the way of the next steps.
A potential side effect is that for templates the widget was passed as
the user data argument. If that turns out to be important, we have to
special case that situation.
2019-11-22 07:46:18 +01:00
Timm Bäder
542b95e7e8
widget-factory: Remove double border around textview
...
Replace the scrolledwindow border with two separator on top/bottom.
2019-10-09 16:57:22 +02:00
Timm Bäder
bcd8941769
widget-factory: Skip xml files in background selection dialog
...
The default contains a xml file for an animated background, so don't try
loading it as a pixbuf.
2019-10-09 16:57:22 +02:00
Timm Bäder
b5b81dea7f
modelbutton: Rework
...
Create all the widgets on demand and use a box layout to arrange them
instead of manual size allocation.
Also don't inherit from GtkButton
2019-10-09 16:57:21 +02:00
Matthias Clasen
9501fc2c14
Merge branch 'nested-popover-menu' into 'master'
...
Nested popover menus
See merge request GNOME/gtk!1076
2019-09-10 01:09:31 +00:00
Timm Bäder
c3f82534bd
widget-factory: Use proper setter to set has-arrow
2019-09-09 17:36:26 +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
e62f10d5f0
widget-factory: Add a spinbutton in a list
2019-09-09 17:36:23 +02:00
Matthias Clasen
bc8d2add04
widget-factory: Add more submenus
...
Split the "Checks & Radios" submenu in the menubar
into two, so we can test opening multiple submenus.
2019-09-08 19:02:06 -04:00
Timm Bäder
ee27587428
scale: Add a destroy notify to set_format_value_func
...
Closes #2098
2019-08-15 17:21:47 +02:00
Timm Bäder
ea5fc348fa
scale: Replace format-value signal
...
There is no reason for this to be a signal, since multiple handlers
don't make sense anyway. It was also broken because the scale needs to
know when a signal handler is added so it can update the value
representation.
Replace the signal with a set_format_value_func function which allows us
to do that.
Fixes #113
2019-08-09 14:30:01 +02:00
Timm Bäder
20d7b7f59b
widget factory: add a tooltip to a button in a popover
2019-07-30 07:05:45 +02:00
Timm Bäder
1459ca2c26
widget factory: Plug a memory leak
2019-07-07 07:24:00 +02:00