Commit Graph

893 Commits

Author SHA1 Message Date
Matthias Clasen
3b18ea71c3 widget-factory: Add a sidebar example 2014-10-03 01:04:29 -04:00
Benjamin Otte
c9d9c9158f gtk-demo: Replace old code
"Hey I know, let's do an easter egg!"
"What kind of easter egg?"
"We can nest lots of textviews!"
"Sounds cool!"
...
"But how does one see a textview inside a textview?"
"What do you mean?"
"Well, it just looks like black text on a white background."
"You mean it's the same as if we just duplicated the text?"
"Yeah!"
"Hrm, maybe we can put a frame around it."
"Sounds good. I'll stuff the textviews in a GtkFrame."
"What? Why? Let's use a GtkEventBox and override its background"
"Why is that a good idea when we have GtkFrame?"
"Because I said so!"
"Okay."
2014-10-03 06:59:14 +02:00
Benjamin Otte
2b6a4ba890 gtk-demo: Remove useless code in colorsel example
We have the color stored in a global variable already. There is
absolutely no need to also force it into the CSS machinery.
2014-10-03 06:48:18 +02:00
Benjamin Otte
23a4affb6f gtk-demo: Improve flowbox demo code
Overriding the background color for a color swatch is wrong. The color
is not the background, it's the foreground, so it should be painted in
a draw signal handler.
2014-10-03 06:45:38 +02:00
Benjamin Otte
40e0973709 gtk-demo: Remove unneeded code
Overlays are transparent by default, no need to override them to be.
2014-10-03 06:40:13 +02:00
Benjamin Otte
2fbc77fce1 gtk-demo: Properly override font color in combobox example 2014-10-03 06:38:21 +02:00
Matthias Clasen
5c46db1d77 widget-factory: Add more buttons
Some more button variations, found in the wild.
2014-10-02 23:38:58 -04:00
Matthias Clasen
5b36bd704b widget-factory: Add a scale button
Instead of two volume buttons, make the second one a scale button
and use microphones.
2014-10-02 21:42:08 -04:00
Matthias Clasen
eb88ce429c gtk-demo: Make the sidebar demo scroll 2014-10-02 18:06:02 -04:00
Ikey Doherty
cdd2651db0 Add GtkSidebar
GtkSidebar behaves internally much like GtkStackSwitcher, providing a vertical
sidebar like widget. It is virtually identical in appearance to the widget
currently used in GNOME Tweak Tool.

This widget is connected to a GtkStack, and builds its own contents as a
GtkListBox subclass, using the "title" child property to provide a consistent
navigatable widget.

Being a subclass of GtkListBox it benefits immediately from strong keyboard
navigation, and minimal changes are required for theming.

https://bugzilla.gnome.org/show_bug.cgi?id=735293

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2014-10-01 00:44:46 -04:00
Matthias Clasen
6ce24d82d6 gtk-demo: Don't create 2 main windows
Loading a builder file with a window leaves a ghost behind, since
windows need to be explicitly destroyed. Avoid that by using
gtk_builder_add_objects_from_resource.
2014-09-25 23:57:34 -04:00
Руслан Ижбулатов
250eb1e889 Add app-menu.ui to EXTRA_DIST 2014-09-09 10:28:48 +00:00
Lapo Calamandrei
541511c89a widget-factory: remove margin from app-notification 2014-09-04 20:18:31 +02:00
Matthias Clasen
2b643a6fd1 widget-factory: More variety in listbox content
Add rows with buttons and checkboxes to the listbox example
on page 2, and make the switch in row 1 toggle selection mode,
to test various cases of widgets in 'selected context'.
2014-09-02 22:25:29 -04:00
Benjamin Otte
4a6ecf33fc gtk-demo: Don't use mad mime type guessing
... for displaying resources. Instead use the proven and way more
reliable method of trial and error.

It's less code and more portable for a start.
But most of all it displays PNM files as text if you fail to compile
the gdk-pixbuf loader for it.
2014-08-27 18:02:48 +02:00
Jehan
4376b4f705 Fix the build of the native gtk-update-icon-cache when cross-compiling.
As a noinst_PROGRAMS, the libtool generated for cross-compiling will be
used, which will mess up the linking. Create a all-local target instead.
Also ensure that building uses always a native version of the tool by
specifying a GTK_UPDATE_ICON_CACHE automake variable.
Finally "config.h" has been created to work for the target platform and
causes problem when cross-compiling. So we temporarily generate a basic
config.h which contains only the strict minimum.
2014-08-13 21:06:51 +00:00
Matthias Clasen
d47192179b widget-factory: Avoid a compiler warning
This is adjusting to the draw_layer signature change.
2014-08-13 09:19:09 -04:00
Matthias Clasen
7af9dc9e21 widget-factory: Add a missing style class
Unfortunately, constructing image-only buttons by just adding
the image as a child does not give us the image-button style
class. Add it manually.
2014-08-13 09:18:08 -04:00
Matthias Clasen
e654fe5124 widget-factory: Don't say 'Etched out' twice
There's no difference between these shadow types anymore, but
it is irritating to see the same label twice.
2014-08-12 22:21:08 -04:00
Matthias Clasen
79f4d5d610 widget-factory: Improve the flow box example
Make the selection actually do something. This is also an opportunity
to test the new draw-layer vfunc in GtkTextView.
2014-08-12 22:14:21 -04:00
Matthias Clasen
9fab7a684b widget-factory: Add a flowbox example
This is now really polished yet, but will let us work towards
'responsive grid'.
2014-08-12 20:23:05 -04:00
Matthias Clasen
c46ca9b25b widget-factory: Make dialogs non-resizable
They have no reason to be.
2014-08-12 20:23:05 -04:00
Matthias Clasen
7b5e8dff9d widget-factory: Don't use rules-hint 2014-08-12 19:06:58 -04:00
Debarshi Ray
a397824e9b widget-factory: Add a reset button to the notification
Change the initial value to something that is not a multiple of 3, so
that dismissing the notification on reset makes sense. Let's use 50
because that is already being used elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=734614
2014-08-11 23:43:43 +02:00
Debarshi Ray
5d8efb43bc widget-factory: Turn off focus-on-click for notification close button
... because that is what most applications are doing. So lets do the
same thing for the sake of consistency and setting a good example.

https://bugzilla.gnome.org/show_bug.cgi?id=734614
2014-08-11 23:43:43 +02:00
Matthias Clasen
0a44be21af widget-factory: Make one switch start out active
This nicely shows off
https://bugzilla.gnome.org/show_bug.cgi?id=734213
2014-08-04 12:28:01 +02:00
Matthias Clasen
5f7485f647 gtk-demo: Drop use of deprecated api
There were several uses of gtk_tree_view_set_rules_hint here.
Just drop them, the theme was ignoring them anyway.
2014-08-04 10:09:18 +02:00
Matthias Clasen
97237fc54c widget-factory: Add a linked combobox example
This came up in https://bugzilla.gnome.org/show_bug.cgi?id=733979
2014-08-03 11:07:25 +02:00
Matthias Clasen
5e3d6ab06b icon-browser: Redo the icon categorization
Instead of slavishly following the naming spec, group the icons
into categories that are more likely to be useful for application
developers. Based on input from Allan Day and Jakup Steiner.
2014-08-02 14:00:02 +02:00
Matthias Clasen
ea1f9bff2d icon-browser: Show category descriptions as tooltips
No better place for them right now.
2014-08-02 13:59:57 +02:00
Matthias Clasen
86d9628a94 icon-browser: Hide the description label when empty 2014-07-29 14:57:28 +02:00
Matthias Clasen
10412dd341 icon-browser: Don't crash on exit 2014-07-29 14:50:10 +02:00
Matthias Clasen
73f54716ad icon-browser: Don't show empty categories
We don't have any icons in International, so don't show the
category. And process-working is really just a theme asset,
so don't show that either.
2014-07-29 14:07:54 +02:00
Matthias Clasen
1a99905055 icon-browser: Make the cell renderer follow state
This is very useful for symbolic icons.
2014-07-29 14:03:48 +02:00
Matthias Clasen
944448be1a icon-browser: Hide the search icon until it works 2014-07-29 14:01:15 +02:00
Matthias Clasen
05d5fa43f3 wip: more icon browser rework 2014-07-29 13:59:02 +02:00
Matthias Clasen
737d15ac53 wip: rework icon browser 2014-07-29 13:59:02 +02:00
Matthias Clasen
33327d6904 icon-browser: Add open-menu to the list 2014-07-25 14:45:30 -04:00
Ignacio Casal Quinteiro
1e10bbef26 gtk-demo: include missing file on EXTRA_DIST 2014-07-23 10:43:41 +02:00
Matthias Clasen
228fe00ecc widget-factory: Avoid a runtime warning
Don't set accelerators too early. GTK+ has not yet been initialized
at that point in main.
2014-07-22 15:32:45 -04:00
Matthias Clasen
eed5efec24 gtk-demo: Improve text scroll example
Add numbers, so the lines can be differentiated, even if they
don't move on screen.
2014-07-21 11:18:10 -04:00
Matthias Clasen
2cb1052987 widget-factory: Show accelerators
We set this up manually here. This could be automated by
constructing the menubar from a menu model.
2014-07-20 00:43:17 -04:00
Matthias Clasen
144083d402 widget-factory: Rename some widgets 2014-07-20 00:43:17 -04:00
Matthias Clasen
48b9b4520b widget-factory: Add accelerators for some actions
With this, Ctrl-Q will close the window, and Ctrl-D will
toggle the dark theme. The accelerators are currently not
shown in the (manually constructed) menus.
2014-07-20 00:43:08 -04:00
Matthias Clasen
bbb324688f Trivial: Move resources into the same prefix 2014-07-19 18:34:58 -04:00
Jasper St. Pierre
488ca4ab30 icon-browser: Improve the look a tiny bit
Add some padding and a border around the scrolled window.
2014-07-17 13:10:50 -04:00
Matthias Clasen
6557a51827 widget-factory: Mark selectable listbox rows non-activatable
Having them selectable is sufficient to get the hover effect.
2014-07-15 23:57:33 -04:00
Matthias Clasen
04b5c5f14a widget-factory: Fix multi-selection example
It turns out that activate-on-single-click interferes with the
expected multi-selection behavior. Turn it off, since there's nothing
to activate in this list, anyway.
2014-07-14 09:17:47 -04:00
Matthias Clasen
0431ee2b57 widget-factory: Use multi-selection for the listbox example 2014-07-14 08:49:54 -04:00
Matthias Clasen
f955548f47 widget-factory: Fix a typo 2014-07-13 13:00:37 -04:00
Matthias Clasen
42d97c380e widget-factory: Use the new ::activatable property 2014-07-13 09:26:35 -04:00
Matthias Clasen
8d70b4692f widget-factory: Improve listbox example spacing 2014-07-13 09:04:58 -04:00
Matthias Clasen
f2c6b31e67 widget-factory: Fix the row activation example
Turns out ::activate on listbox rows is only for key bindings,
so use ::row-activated.
2014-07-12 17:30:25 -04:00
Matthias Clasen
3cbdbdd3e6 widget-factory: Demonstrate listbox headers
Add a less trivial examples of headers in the colors listbox.
2014-07-12 14:47:48 -04:00
Matthias Clasen
9b6563dcdc widget-factory: Add some row activation to the listbox example
This shows some fallout from the gesture conversion.
2014-07-12 14:47:48 -04:00
Stefano Facchini
1aa54bb946 widget-factory: Do no crash on variadic arguments 2014-07-12 11:43:14 +02:00
Matthias Clasen
e54dad135c widget-factory: Add another listbox example
This one is long enough to scroll, and has selection.
2014-07-12 03:31:29 -04:00
Benjamin Otte
e29d0a0a38 gtk-demo: This is not a unique app
When running gtk-demo a 2nd time, it's usually to compare its
output with a different version of gtk-demo.
2014-07-12 07:13:28 +02:00
Benjamin Otte
62971dd999 widget-factory: This is not a unique app
When running widget-factory a 2nd time, it's usually to compare its
output with a different version of widget-factory.
2014-07-12 07:13:28 +02:00
Matthias Clasen
0331dc984b widget-factory: Add a selectable label
We already have selectable labels in some of the dialogs,
but this is more direct, and also shows links in labels.
2014-07-11 22:23:33 -04:00
Matthias Clasen
3780fc787c widget-factory: Adapt to label clipping change
The paned examples on page 2 were implicitly relying on labels
drawing unclipped. Instead of setting the view class only on the
labels, set it on the paned's instead.
2014-07-11 21:15:03 -04:00
Matthias Clasen
797e7968f3 widget-factory: Enable even/odd rows
More treeview testing.
2014-07-10 07:15:33 -04:00
Matthias Clasen
f78a224e96 widget-factory: More treeview examples
The new treeview on page 3 sports expanders, grid and tree lines,
alternating row colors, etc.
2014-07-10 06:33:49 -04:00
Matthias Clasen
2f12fd5599 gtk-demo: Fix expand button box demo
Set the spacing to 0, so the buttons are actually linked.
2014-07-09 13:19:36 -04:00
Matthias Clasen
b31a310d7d widget-factory: Use the new application resource support 2014-07-09 10:13:38 -04:00
Jakub Steiner
a673553aba widget-factory: the menu icon name changed 2014-07-09 13:35:57 +02:00
Matthias Clasen
092c26871e widget-factory: Use view-context-menu-symbolic 2014-07-08 06:53:30 -04:00
Matthias Clasen
04f9445302 widget-factory: Content for the action dialog
Dialogs look better with some actual content.
2014-07-08 06:33:19 -04:00
Matthias Clasen
59f3211b61 widget-factory: Add reorderable treeview columns 2014-07-07 14:35:33 -04:00
Matthias Clasen
3939e3ffcc widget-factory: Fill out settings dialog
This gives an opportunity to use the dim-label style class.
2014-07-06 23:10:44 -04:00
Matthias Clasen
2a7bd3a2da widget-factory: Avoid a crash on exit 2014-07-06 22:37:56 -04:00
Matthias Clasen
079e08f92d widget-factory: Add some mnemonics 2014-07-04 16:49:55 -04:00
Matthias Clasen
58f27de927 widget-factory: Unset needs-attention too
This is not done automatically, so unset needs-attention when
the page becomes current.
2014-07-04 16:27:11 -04:00
Matthias Clasen
5e5ecbbf81 widget-factory: show off needs-attention stack pages
When clicking 'Action' in the 'Act' dialog, we mark the third
page as needing attention a second later. This unveils that we
currently don't have any theming for needs-attention in Adwaita.
2014-07-04 15:46:47 -04:00
Matthias Clasen
f64b6b3479 widget-factory: Expand the treeview example a bit
Show resizable, sortable and ellipsizable columns.
2014-07-02 23:55:20 -04:00
Matthias Clasen
d800203b88 gtk-demo: Only show non-symbolic icons in toolpalette
Otherwise, we get every icon twice. To switch between symbolic
and non-symbolic icons, this css fragment comes in handy:
* { -gtk-icon-style: symbolic; }
2014-06-30 13:28:46 -04:00
Matthias Clasen
eaa3329cde widget-factory: Use a standard icon name
Using edit-find instead of search has the advantage that there
is a symbolic variant of the icon.
2014-06-30 13:24:28 -04:00
Matthias Clasen
b3b861c9d6 widget-factory: Plug a memory leak 2014-06-28 23:27:36 -04:00
Matthias Clasen
18126121a4 widget-factory: Small cleanup
Use gtk_builder_new_from_resource and get rid of an unneeded GError.
2014-06-28 16:22:43 -04:00
Matthias Clasen
7074776a04 widget-factory: Make the entry progress stop as well 2014-06-28 16:19:33 -04:00
Matthias Clasen
3c40082316 widget-factory: Make the entry progress variable too
Make the scale that currently controls the speed of the progressbar
control the progress speed in the entry as well.
2014-06-28 15:23:29 -04:00
Matthias Clasen
c389fc64f7 widget-factory: Add an icon view
We didn't have one before, and this gives us a chance to show off
rubberbanding and symbolic icon rendering.
2014-06-28 11:37:29 -04:00
Matthias Clasen
76eed98b36 widget-factory: Enable alpha in the color button
This lets us verify that the theme treats the alpha scale fairly.
2014-06-28 11:12:23 -04:00
Matthias Clasen
ad09fbbac0 widget-factory: Stop using GtkImageMenuItem
A plain GtkMenuItem works just fine here.
2014-06-27 21:45:33 -04:00
Matthias Clasen
d7bccbe53b widget-factory: Stop using the deprecated GtkAlignment::left-padding
These alignments can just be dropped without loss.
2014-06-27 21:45:23 -04:00
Matthias Clasen
e73aa234e9 widget-factory: Don't use deprecated GtkColorButton::color
Instead, simply set the rgba property, which accepts the
same value.
2014-06-27 21:45:18 -04:00
Matthias Clasen
cac4050240 widget-factory: Drop redundant defaults from the .ui file
In particular, we drop xalign, since it is deprecated.
2014-06-27 21:40:08 -04:00
Rico Tzschichholz
aab74adbce icon-browser: Add iconbrowser.gresource.xml to EXTRA_DIST 2014-06-26 14:04:42 +02:00
Matthias Clasen
c1d8ba930b icon-browser: drop icons that were removed from Adwaita
These non-standard icons were dropped from Adwaita. Eventually,
the icon-browser code should be changed to show all standard
icons + whatever is actually in the icon theme, instead of
hardcoding a list of non-standard names.
2014-06-25 12:44:20 -04:00
Matthias Clasen
fa4301c63e icon-browser: fix a typo 2014-06-25 06:50:39 -04:00
Matthias Clasen
d46f165636 icon browser: drop an misnamed icon
small-progress was just my local test icon for scaling of spinners.
2014-06-24 22:24:46 -04:00
Matthias Clasen
a5f474bc66 Add an icon browser
This is meant to help app authors choose the right icons.
2014-06-24 21:58:40 -04:00
Matthias Clasen
18aa240267 Forgotten file 2014-06-24 13:23:29 -04:00
Matthias Clasen
545704401e Drop standalone pixbuf-demo
The same demo is included in gtk3-demo. One copy is enough.
2014-06-24 13:12:56 -04:00
Matthias Clasen
11e394b7b5 widget-factory: Fix another icon size problem
0 is still not a valid icon size.
2014-06-22 13:32:50 -04:00
Matthias Clasen
a5543beced widget-factory: Fix an icon size problem
0 is not a valid icon size, and setting it has unpredictable
results. Replace it by 1, which is the right icon size to use
in buttons.
2014-06-22 11:52:11 -04:00
Matthias Clasen
a24ef62f4d Big spinner 2014-06-20 15:54:17 -04:00
Matthias Clasen
f56345bbad widget factory: Use a property action for the toolbar toggle
This is slightly more elegant than doing it manually.
2014-06-20 11:13:33 -04:00
Matthias Clasen
e7af95a40c widget factory: Add a statusbar
A widget that is not represented in the widget factory is likely
to not get proper attention from theme authors.
2014-06-20 11:10:22 -04:00
Matthias Clasen
5ef4d71b15 widget-factory: Add some tooltips 2014-06-12 05:53:31 -04:00