Matthias Clasen
cb43af090b
notebook: Fix a misplaced tab label
...
Sometimes default tab labels ("Page <n>") get created on-demand,
and in that case, we were forgetting to put them below the tab
node in the CSS node tree. The visible result of this is that the
heuristics for when to give notebooks background in Adwaita fail
in some cases. So, make sure to always place the label below the
tab node.
2016-02-15 10:38:13 -05:00
Lapo Calamandrei
1140a514ea
Adwaita: notebook fixes
...
make the tab close button a tad bigger, use header 'paddings' in
place of 'tabs' margins for spacing.
2016-02-15 14:27:14 +01:00
Matthias Clasen
4e2674edbb
Expand the docs for gtk_window_set_default_size()
...
Mention that this function should be used together with
gtk_window_get_size() when saving and restoring window sizes.
2016-02-15 08:23:12 -05:00
Matthias Clasen
e10f44e896
places sidebar: use a box
...
No need for a grid here. Patch by Timm Bäder.
2016-02-15 08:19:25 -05:00
Lapo Calamandrei
88c68f2eef
Adwaita: sidebar background-color
...
it was covered by the contained list background, which is now
transparent.
2016-02-15 13:52:41 +01:00
Lapo Calamandrei
0b1aeceb6e
Adwaita: no rounded corner for tiled backdrop windows
...
fixes https://bugzilla.gnome.org/show_bug.cgi?id=762067
2016-02-15 13:31:42 +01:00
Lapo Calamandrei
aed7ca1b3d
Revert "Adwaita: no rounded corners for backdrop tiled windows"
...
This reverts commit aa4b385398
.
Erroneusly pushed unfinished stuff...
2016-02-15 13:28:46 +01:00
Lapo Calamandrei
4d26640045
Adwaita: shortcutswindow fixes
...
use darker text and tweak the keycap vertical centering,
addresses https://bugzilla.gnome.org/show_bug.cgi?id=761778
2016-02-15 13:07:37 +01:00
Lapo Calamandrei
aa4b385398
Adwaita: no rounded corners for backdrop tiled windows
...
fixes https://bugzilla.gnome.org/show_bug.cgi?id=762067
2016-02-15 12:36:06 +01:00
Chun-wei Fan
0e9f24b5a4
gtk/gtkentry.c: Fix build on pre-C99
...
This file now uses nearbyint(), so include fallback-c89.c so that
compilers that don't provide the function will not get upset.
2016-02-15 17:22:00 +08:00
Chun-wei Fan
f3f3a1c750
Fix 'make dist'
2016-02-15 17:20:54 +08:00
Benjamin Otte
beb76936d9
cellrenderertoggle: Use "check" and "radio" names
...
... instead of just adding a style class.
2016-02-15 04:41:12 +01:00
Benjamin Otte
a4a158e885
win32 theme: Remove a bunch of workarounds that are no longer necessary
2016-02-15 04:41:12 +01:00
Benjamin Otte
b227d023f3
win32 theme: Draw checkmarks and radiomarks properly
...
Instead of drawing them as the background, use -gtk-icon-source.
Also size the marks properly.
Because Windows doesn't have indeterminate radio buttons, use a
cross-fade between checked and unchecked radiomark instead. But
unlike previously, use CSS cross-fade() syntax to draw it.
2016-02-15 04:41:12 +01:00
Benjamin Otte
de38435921
cssimagecrossfade: Fix order of images when parsing/printing
...
The syntax is cross-fade(<percentage> <end>, <start>), not the
other way around. That's because the percentage refers to the end image.
2016-02-15 04:41:12 +01:00
Benjamin Otte
f425b5549c
win32: Add support for -gtk-win32-part-width/height to CSS
...
It's unused by now, but I want it for min-width of checks/radios.
2016-02-15 04:41:12 +01:00
Benjamin Otte
b43844f9f9
win32 theme: Don't set the color on *
...
Instead, set it on .background, so it gets inherited everywhere.
2016-02-15 04:41:12 +01:00
Benjamin Otte
6d909018f7
win32 theme: Use same spinner as Adwaita
2016-02-15 04:41:12 +01:00
Benjamin Otte
3597baf272
win32: Update color handling to recent GtkWin32Theme changes
2016-02-15 04:41:12 +01:00
Benjamin Otte
a1617c6d6d
win32: Canonicalize theme-name before adding to hash table
...
This way, we get rid of du0plicates.
2016-02-15 04:41:12 +01:00
Benjamin Otte
d584e22e02
win32: Add gtk_win32_theme_parse()
...
So all places can use this function instead of parsing things themselves.
2016-02-15 04:41:12 +01:00
Benjamin Otte
3b19db425e
css: Add a number value handling win32 sizes
2016-02-15 04:41:12 +01:00
Lapo Calamandrei
915fe87a62
Adwaita: fix treeview dnd column headers
2016-02-14 22:30:32 +01:00
Lapo Calamandrei
54b378b3df
Adwaita: flatten up search bars and inline toolbars
2016-02-14 21:48:31 +01:00
Lapo Calamandrei
f1b34a719e
Adwaita: image-button sizing fix
2016-02-14 21:07:11 +01:00
Matthias Clasen
3c9a63bcb1
Adwaita: Fix a padding problem in action bars
...
Padding adds up. A selector like "actionbar box" matches any box
inside an actionbar, so nested boxes accumulate more and more
padding. The intention clearly was to just give padding to the
topmost box that is the direct child of the actionbar's revealer.
https://bugzilla.gnome.org/show_bug.cgi?id=762036
2016-02-14 14:54:49 -05:00
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
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
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
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
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
Matthias Clasen
bb15c53966
notebook: fix arrow states
...
Some code was confusing 0 with ARROW_NONE, causing us to not properly
update the state of the arrow gadgets.
2016-02-11 06:47:28 -05:00
Benjamin Otte
f5d4fb1a0b
inspector: Don't use unused variables
...
Windows-specific refactorings broke this.
2016-02-11 04:14:56 +01:00
Benjamin Otte
88b7dfdb1e
win32: Move init code into windows-specific code
...
Avoids warnings about undefined functions on non-windows.
2016-02-11 04:14:28 +01:00
Benjamin Otte
4dfbaccd67
win32 theme: Add a GtkWin32Theme object
...
This object wraps a HTHEME and takes care of recreating it on theme changes.
2016-02-11 03:44:48 +01:00
Benjamin Otte
1519801878
win32: Capture WM_THEMECHANGED
...
We're not doing anything useful with it yet. This will follow in the coming commits.
2016-02-11 03:44:48 +01:00
Benjamin Otte
99153ed585
win32: Remove XP-specific code
...
We don't support XP anymore.
2016-02-11 03:44:48 +01:00
Benjamin Otte
a620a1d688
win32: Remove unused functions / header includes
2016-02-11 03:44:48 +01:00
Benjamin Otte
9efb275a13
filechoosernativewin32: Remove unused variables
2016-02-11 03:44:47 +01:00
Benjamin Otte
dda959332f
imcontextsimple: Remove unused variable on win32
2016-02-11 03:44:47 +01:00
Benjamin Otte
ce8a98e21b
win32 theme: Get rid of deprecated style properties
...
That's pretty easy, because we can just delete them. The theme is broken either way.
2016-02-11 03:44:47 +01:00
Benjamin Otte
9c700b2bc6
win32 theme: Replace pseudoclasses with undeprecated ones
2016-02-11 03:44:47 +01:00
Benjamin Otte
93ecb1d187
win32 theme: Do a quick'n'dirty search/replace
...
Try to replace the old style names with then new style names.
The theme is still entirely way too broken. But at least one can see something.
2016-02-11 03:44:47 +01:00
Benjamin Otte
76e56c5038
win32: Stop using _gdk_display global in device code
...
Use gdk_device_get_display() instead.
2016-02-11 03:44:47 +01:00
Benjamin Otte
ccbfa64d67
win32embedwidget: Mark deprecated sections
2016-02-11 03:44:47 +01:00
Benjamin Otte
ccc7e3058c
filechoosernativewin32: Silence gcc
2016-02-11 03:44:47 +01:00
Benjamin Otte
068f8a3da1
filechoosernativewin32: Add missing return type
...
Looks like a line accidentally was deleted there.
2016-02-11 03:44:47 +01:00
Benjamin Otte
117e303b44
filechoosernativewin32: Define MSC_VER at top of file
...
The headers we include might include windows headers which define _MSC_VER already.
2016-02-11 03:44:47 +01:00
Benjamin Otte
0ea9131ff7
printoperation-win32: Silence gcc
2016-02-11 03:44:47 +01:00
Benjamin Otte
573f51cb29
mountoperation: Silence gcc
...
Also, printf()ing a GPid should be forbidden.
2016-02-11 03:44:47 +01:00
Benjamin Otte
1d980192fa
immodule: Stop gcc from complaining
2016-02-11 03:44:47 +01:00
Timm Bäder
becfd18b07
overlay: set css name
2016-02-10 14:03:56 +01:00
Timm Bäder
bdd182f38c
frame: Set border gadget state after creating it
2016-02-10 14:03:39 +01:00
Timm Bäder
c44364f1d1
spinbutton: Free the gadget in finalize
2016-02-10 12:30:35 +01:00
Timm Bäder
8ea573b473
css node tree: Fix crash
...
This function would return "" whenever the state of the css node was
unset, causing a crash when selecting the css node tree from the
sidebar.
2016-02-10 12:28:32 +01:00
Matthias Clasen
a3a5cf1087
text view: Improve tag pointer tracking
...
A problem that has been observed in polari is that links in tags
are clickable all the way into the margin. This problem is caused
by gtk_text_view_get_iter_at_position ignoring the return value
of pango_layout_xy_to_index. Instead, pass it back as a boolean
return value. This is technically an API break, but we've allowed
ourselves to change return types from void to gboolean before.
2016-02-10 00:01:54 -05:00
Rui Matos
019dab7c38
gtkmagnifier: Avoid a crash if the inspected widget is finalized
...
If the inspected widget is finalized and we then try to disconnect
from its signals we'll crash.
https://bugzilla.gnome.org/show_bug.cgi?id=761775
2016-02-09 15:35:17 +01:00
Timm Bäder
1331b60029
A few more documentation fixes
2016-02-09 08:05:16 +01:00
Timm Bäder
c5369356e8
Various documentation fixes
...
Always have Since: annotations at the very bottom, use the correct
ClassName::signal-name/ClassName:property-name syntax, fix a few typos
in type names, wrong function names, non-existing type names, etc.
2016-02-08 22:56:52 +01:00
Rico Tzschichholz
76fedc1882
gtk: Fix some return-values annotations (transfer none/full)
2016-02-08 14:03:55 +01:00
Matthias Clasen
dc407dbc8f
inspector: Avoid crash in magnifier
...
We can't use gtk_widget_draw on widgets that are not allocated.
2016-02-08 09:34:24 +01:00
Timm Bäder
486a0a467d
image: _get_style_context never returns NULL
2016-02-07 19:16:26 +01:00
Timm Bäder
ded745a4b9
Make gtk_icon_helper_invalidate private
2016-02-07 19:16:26 +01:00
Timm Bäder
0bd6c48315
Add and use gtk_icon_helper_invalidate_for_change
2016-02-07 19:16:26 +01:00
Timm Bäder
0c80210685
iconhelper: Save whether the surface is symbolic
2016-02-07 19:16:26 +01:00