Commit Graph

46201 Commits

Author SHA1 Message Date
Lapo Calamandrei
601e762973 Adwaita: correct spacing for mixed buttons 2016-02-14 16:39:19 +01:00
Benjamin Otte
6edb420e51 paned: Fix drawing
Clip children to their window's size. That way no overdraw happens for
these widgets. But don't clip the handle.

We might in the future consider not clipping un-shrinkable children.

https://bugzilla.gnome.org/show_bug.cgi?id=762021
2016-02-14 16:10:07 +01:00
Benjamin Otte
88f0885638 paned: Use content allocation instead of widget allocation
We don't want to include padding and borders in our calculations
involving the handle.
2016-02-14 16:07:06 +01:00
Benjamin Otte
7e47418d0c paned: rtl-flip with the correct rectangle 2016-02-14 15:52:35 +01:00
Lapo Calamandrei
1bfbd23a0c Adwaita: don't set a border for drop targets
to avoid active drop targets to grow.
2016-02-14 14:44:57 +01:00
Lapo Calamandrei
bf45d06a79 Adwaita: scss cosmetic changes 2016-02-14 14:33:30 +01:00
Lapo Calamandrei
72db203672 Adwaita: fix scale popup button size 2016-02-14 14:21:01 +01:00
Michael Catanzaro
ea423318f1 Fix a typo 2016-02-13 22:15:07 -06:00
Matthias Clasen
3a499d61dc gtk-demo: Add window size saving example
Implement the recommendations from
https://wiki.gnome.org/HowDoI/SaveWindowState
in the Application Class example.
2016-02-13 23:03:18 -05:00
Matthias Clasen
7bca66e1ff gtk-demo: modernize the application demo
Subclass GtkApplication and GtkApplicationWindow
and use a template.
2016-02-13 23:03:18 -05:00
Lapo Calamandrei
7f2d4400ba Adwaita: try being smarter wrt extending buttons. 2016-02-14 02:35:28 +01:00
Lapo Calamandrei
adddd1a9eb Revert "Adwaita: remove an unneded selector."
This reverts commit 05dff4ccb0.
It was needed actually...
2016-02-14 01:20:02 +01:00
Lapo Calamandrei
05dff4ccb0 Adwaita: remove an unneded selector. 2016-02-14 00:34:29 +01:00
Lapo Calamandrei
12daac76d7 Adwaita: notebook arrow styling. 2016-02-14 00:25:04 +01:00
Matthias Clasen
29a7373802 widget-factory: Add an inline toolbar example
This pattern is still used in applications, so we should have it
represented here to keep it working well.
2016-02-13 17:11:59 -05:00
Matthias Clasen
35bed27b9d Docuemnt calc() support in CSS 2016-02-13 06:29:34 -05:00
Chao-Hsiung Liao
3f4f914fb4 Updated Chinese (Taiwan) translation 2016-02-13 06:19:31 +00:00
Chao-Hsiung Liao
ecdd420b55 Updated Chinese (Taiwan) translation 2016-02-13 06:17:15 +00:00
Benjamin Otte
d3e8cf87aa testsuite: Don't use deprecated APIs 2016-02-13 06:41:29 +01:00
Benjamin Otte
e7470be7bf tests: Port testlockbutton to GTask
Get rid of deprecations that way.
2016-02-13 06:26:42 +01:00
Benjamin Otte
93eec3e52f css: Implement transitions for numbers of different units
We now can transition from 10px to 100%.

Note that this requires a teensy tiny hack in
gtk_css_value_transition(), but so be it.
2016-02-13 04:49:08 +01:00
Benjamin Otte
0cda3ba3e8 calc: Allow subterms with '(' ')' bracketing
Some more tests included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
63d1f80742 css: Add support for '*' and '/' to calc()
More tests are included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
4a9fa1e750 css: Add API to handle order when printing calc()
Also, add some tests and update old ones to print calc() statements
correctly.
2016-02-13 04:49:08 +01:00
Benjamin Otte
65dd9da44a css: Add support for sums to calc()
This requires adding code to do math on number values:
  gtk_css_number_value_multiply()
and
  gtk_css_number_value_try_add()
were added to achieve that.

Some tests are included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
cd6dc954f2 css: Add initial support for calc()
So far, calc() only supports literals, ie it's completely useless.
2016-02-13 04:49:08 +01:00
Benjamin Otte
a52ecd2be6 css: Add gtk_css_number_value_can_parse()
Use it instead of _gtk_css_parser_has_number().

We need that once we introduce calc() support.
2016-02-13 04:49:08 +01:00
Benjamin Otte
b246d55472 css: Turn number values into a virtual type
GtkCssNumberValue is now a base class for numbers.

Actual numbers are now implemented in GtkCssDimensionValue. The name is
borrowed from the CSS spec, so there.
2016-02-13 04:49:07 +01:00
Benjamin Otte
e2d966eda5 cssnumbervalue: Remove gtk_css_number_value_get_unit()
This is in preparation for calc(), as calc(50% - 5px) is valid CSS
but has 2 units. Instead, add a function to query a value's dimension
(so we can differentiate lengths from numbers) and add a function to
query if the value contains percentages.
2016-02-13 04:49:07 +01:00
Benjamin Otte
7b301fcece linear-gradient: Remove the hack using NUMBER
Instead, add a "side" member to the struct that keeps sides explicitly.
2016-02-13 04:49:07 +01:00
Benjamin Otte
0645425046 cssimageradial: Don't print 2 spaces 2016-02-13 04:49:07 +01:00
Matthias Clasen
51af70495a gadget: Be careful in geometry calculations
Margins can be negative, and if we are not careful, then
content+padding+margin can end up with negative dimensions,
which can upset pixman and others. This commit ensures
that a gadget will not request or draw boxes with negative
dimensions, and get_border_allocation and get_content_allocation
will not return boxes with negative dimensions.

This fixes a crash in the paned separator drawing code that
can be reproduced by setting separator padding to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=759657
2016-02-12 22:26:04 -05:00
Matthias Clasen
71559c603e file chooser: Avoid nonworking search+save combinations
With the location entry up in the header bar in save mode, we can
end up with the search model being in use when the user types in
the location entry. In this case, we don't make the Save button
sensitive as we should.

Having two entries in the dialog is somewhat confusing anyway,
so just stop the search when the user starts typing in the location
entry.

https://bugzilla.gnome.org/show_bug.cgi?id=761757
2016-02-12 22:05:40 -05:00
Matthias Clasen
811a9b21c1 file chooser: Use the right model when getting the selection
We don't need to make assumptions about which model is currently
used since gtk_tree_selection_get_selection hands us the model.

https://bugzilla.gnome.org/show_bug.cgi?id=761757
2016-02-12 20:35:26 -05:00
Matthias Clasen
4c37719639 Adwaita: Insensitive notebook arrows
Just make insensitive notebook arrows gray until better
styling appears.

https://bugzilla.gnome.org/show_bug.cgi?id=761716
2016-02-12 18:24:20 -05:00
Matthias Clasen
102b3bfddf paned: Draw handle before children 2016-02-12 18:10:02 -05:00
Carlos Garnacho
d55b8151f2 x11: Avoid setting has_pointer_focus if a EWMH compliant WM is present
This is mostly useful to have focus behave sanely on lack of WM, so avoid
any check there if we're positive there is a WM handling focus.

https://bugzilla.gnome.org/show_bug.cgi?id=677329
2016-02-12 22:05:30 +01:00
Matthias Clasen
48d7219296 paned: Don't overdraw
When moving children 'off', we can't allow them to draw outside
the paned allocation, so clip when drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=761903
2016-02-12 15:02:34 -05:00
Caolán McNamara
5562f4f273 gtk-demo: spinbutton and menubar examples
https://bugzilla.gnome.org/show_bug.cgi?id=761900
2016-02-12 10:02:31 -05:00
Jakub Steiner
eb90c4f9ed Adwaita: make popovers less 1995
- use regular bgcolor
2016-02-12 14:38:03 +01:00
Carlos Garcia Campos
170cb01675 Revert "Remove _gtk_box_get_children"
This reverts commit 572e9a0402.

_gtk_box_get_children was not doing exactly the same than
gtk_container_get_children does, because the latter uses the forall
implementation of GtkBox that takes into account the children pack mode while
the former just iterated the list of children. This broke the order of
the buttons in a GtkButtonBox when they were packaged with PACK_END.
2016-02-12 13:29:21 +01:00
Matthias Clasen
452d25b13d placessidebar: Increase padding
This should bring us back to the look of 3.18.

https://bugzilla.gnome.org/show_bug.cgi?id=761791
2016-02-11 22:51:35 -05:00
Colomban Wendling
a47d9a7b65 treeview: Make sure the editing widget's top left is always visible
https://bugzilla.gnome.org/show_bug.cgi?id=761838
2016-02-11 22:41:58 -05:00
Matthias Clasen
32804e098e Adwaita: Don't grow flat entries
Entries in treeviews and similar embedded situations don't really
work well if their height is forced to be big. Take out the min-height
for these.

https://bugzilla.gnome.org/show_bug.cgi?id=761686
2016-02-11 22:36:07 -05:00
Caolán McNamara
85b44a3e20 cannot not -> must
https://bugzilla.gnome.org/show_bug.cgi?id=761826
2016-02-11 22:18:26 -05:00
Matthias Clasen
56ba81530a placesview: Fix some minor issues
Make the button not grow too big, and ensure that the actionbar
has a background.

https://bugzilla.gnome.org/show_bug.cgi?id=761792
2016-02-11 22:16:33 -05:00
Matthias Clasen
23d2f2d0e1 Adwaita: tone down treeview separators 2016-02-11 22:03:47 -05:00
John Ralls
3bf1151051 Fix Quartz clipboard image retrieval.
It does no good to iterate through a series of mime types to call a
function when the eventually-called function,
_gtk_quartz_get_selection_data_from_pasteboard() in this case, gives the
wrong answer and stops the iteration on all but one especially if that
one isn't first.

The one is "image/tiff" and the quartz pasteboard function will return
any image type Quartz knows about for it, so lose the iteration and use
only "image/tiff".
2016-02-11 14:00:47 -08:00
Lapo Calamandrei
1bd0431ab2 Adwaita: fix bogus selector...
...ruining the indeterminate check animation
2016-02-11 18:38:31 +01:00
Lapo Calamandrei
460aa64c58 Adwaita: animate check and radios 2016-02-11 18:27:25 +01:00