Commit Graph

46465 Commits

Author SHA1 Message Date
Benjamin Otte
3463031929 win32 theme: Implement GtkFrame 2016-02-27 17:23:44 +01:00
Benjamin Otte
39bfac0876 win32 theme: Remove special case for notebooks
The special case is coded into Wine, but it makes notebooks
disappear wrong. So remove it.
2016-02-27 17:03:49 +01:00
Benjamin Otte
5d34ee729d win32: Implement fallback code for tabs
This is naive code in that it doesn't do the rounded edges for the
tab items yet. We can fix that later I guess.
2016-02-27 14:34:33 +01:00
Benjamin Otte
b18e64e6c6 win32: Add fallback drawing code for window frames 2016-02-27 14:34:33 +01:00
Benjamin Otte
879333d226 win32: Finish button drawing code
We now draw real Windows 95 buttons.

Also split out a draw_edge() function that is supposed to emulate
Windows' DrawEdge() function. I guess we'll need it in other places,
too.
2016-02-27 14:34:33 +01:00
Paolo Borelli
70d689cddd gdk: calculate pixel color shift and precision lazily
This gets rid of the decompose_mask utility entirely and simplifies
backend code.
2016-02-27 12:27:54 +01:00
Paolo Borelli
f73e7680ed gdk: factor out utility shared among backends
Removes duplicated code and makes sure we use the version which
is safe against infinite loops
2016-02-27 10:46:59 +01:00
Benjamin Otte
053e549dbc notebook: Redo notebook implementation
So far, this only reworks the tabs at top implementation.
Windows doesn't have support for theming tabs at left/right/bottom
so we need to figure out what to do there. Wine falls back to
unthemed code.
2016-02-27 05:15:57 +01:00
Benjamin Otte
245d217e06 boxgadget: Add ability to draw children in reverse
This is necessary for GtkNotebook so that the stack is always drawn
before the header.
And that is necessary so that the active tab can use negative
margins to overdraw the border of the stack to create a gap and
simulate old GTK2-style visuals for notebooks.
2016-02-27 03:59:20 +01:00
Benjamin Otte
a2fa647199 cssimagewin32: IMplement printing
Caveat: over() and margins() arent' printed, but they are soon gonna
be removed anyway.
2016-02-27 03:59:20 +01:00
Benjamin Otte
e45cb3340c window: Include decoration border and padding in resize area
This is relevant for the Windows theme, which is the only theme that
uses padding on decorations. All other themes are unaffected.
2016-02-27 03:59:20 +01:00
Benjamin Otte
cdb1cda68b notebook: The active tab is now :checked
:active is reserved for "mouse button down on node", so we have to use
something else. And stack switcher and radio buttons use :checked for
the active widget, so it makes sense to use :checked for the active tab,
too.

Themes have been adapted.

TODO: Implement :active for tabs.
2016-02-27 03:48:46 +01:00
Benjamin Otte
6b4788c3ea textview: Support borders in text node 2016-02-27 03:39:51 +01:00
Benjamin Otte
d7bc0fd24c textview: Fix coordinates when background drawing of text node
Fixes black areas in source view of gtk-demo.
2016-02-27 03:27:39 +01:00
Matthias Clasen
914f7bd6e4 wayland: Survive without primary selection
I am testing GTK+ master against mutter 3.19.90, so I'd
like GTK+ to survive even when the compositor does not
support the primary selection interface.
2016-02-26 19:48:05 -05:00
Cédric Valmary
b72996cde4 Updated Occitan translation 2016-02-26 20:56:32 +00:00
Matthias Clasen
ca3d87ce70 Avoid an out-of-bounds access
When the offset gets smaller than min_offset, we can't
access the array at that position.
2016-02-26 15:52:19 -05:00
Matthias Clasen
8ff40b5d14 Plug a small memory leak 2016-02-26 15:52:19 -05:00
Matthias Clasen
88e372cd09 infobar: Avoid a memory leak in an error case
Parsing <action-widgets> could sometimes fail to free
some of the data, if a nonexisting widget is referenced.
Found by gcc's leak sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
c784d5d700 levelbar: Avoid a use-after-free
We were freeing the old offset before using its name to
recreate a new one. Don't do that.
Found by gcc's undefined behavior sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
5ca860dcaf dialog: Avoid a memory leak in an error case
Parsing <action-widgets> could sometimes fail to free
some of the data, if a nonexisting widget is referenced.
Found by gcc's leak sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
6108c646c5 cssselector: Don't invoke undefined behavior
Avoid undefined behavior in the calculation of some
hash values. Found by gcc's undefined behavior sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
2cabfcc801 Avoid an a crash with GTK_DEBUG=builder
We might cast objects to GtkBuildable even if they aren't,
to print their names. Don't do that.

Found by gcc's address sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
9f37557ffc Fix an memory overrun
This was detected by gccs address sanitizer.
2016-02-26 15:52:19 -05:00
Cédric Valmary
3084eca14b Updated Occitan translation 2016-02-26 20:35:37 +00:00
Carlos Garnacho
a2c575e34e wayland: Use the page size as the selection buffer size
And ensure we don't attempt to read EOF twice, once is enough.
2016-02-26 19:59:17 +01:00
Carlos Garnacho
ed3c87df7a wayland: Implement the (so far internal) primary selection protocol
Implement it using the internal copy of the protocol. Otherwise,
we just deal with it the same than clipboard selection, just mapping
it to the PRIMARY atom instead of the CLIPBOARD one.

https://bugzilla.gnome.org/show_bug.cgi?id=762561
2016-02-26 19:59:17 +01:00
Carlos Garnacho
f9f5586714 wayland: Make the function to get the last serial a seat one
This will be useful for primary selection.

https://bugzilla.gnome.org/show_bug.cgi?id=762561
2016-02-26 19:59:17 +01:00
Carlos Garnacho
787e1d7113 wayland: Add gtk-primary-selection protocol
This protocol is an internal mirror of the primary selection drafts
being proposed for wayland-protocols. No changes besides prefix/suffix
changes.

https://bugzilla.gnome.org/show_bug.cgi?id=762561
2016-02-26 19:59:17 +01:00
Lapo Calamandrei
4fd5ad2f07 Adwaita: notebook tab sizing fix 2016-02-26 19:01:55 +01:00
Fredy Paquet
0a6ee5e2cf W32: Fix for commit 1f74f12d9, re-enabling decimal separator key
1f74f12d9 rendered entry of keypad decimal mark unuseable for
several national keyboard layouts, this commit amends that, at
least for W32, and makes GTK+ behave more or less the same way
W32 behaves.

The patch works like this:
- When typing the first character at the keyboard or when switching
  keyboard layouts, the decimal mark character will be cached in the
  static variable "decimal_mark" within gdkkeys-win32.c

- in case of WIN32, gdk_keyval_to_unicode() asks gdkkeys-win32.c for the
  current decimal_mark when converting GDK_KEY_KP_Decimal.

https://bugzilla.gnome.org/show_bug.cgi?id=756751
2016-02-26 17:24:32 +00:00
Lapo Calamandrei
9f606b8270 Adwaita: stricter selector for split headerbar separator
with a descendant select was erroneusly catching normal headerbar
separators in paned split headerabar case, see gedit. Using a child
selector fixes.
2016-02-26 13:15:37 +01:00
Lapo Calamandrei
296a7c24f9 Adwaita: simplify mixed buttons styling 2016-02-26 13:07:09 +01:00
Lapo Calamandrei
1a0b6568fa Adwaita: fix separator in non paned using split headerbar
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=762593
2016-02-26 12:53:02 +01:00
Carlos Soriano
ea9e8221b1 gtkplacessidebar: use gpointers in trash row
It's the right casting. Forgot to push it with the previous patch.
2016-02-26 11:55:05 +01:00
Carlos Soriano
377ac909b7 gtkplacessidebar: clean up trash row on destroy
Track with a weak ref the trash row, so we can clean up the data in the
private struct.

Spotted and reviewed by Christian Hergert.
2016-02-26 11:52:50 +01:00
Gábor Kelemen
c3e56d3d83 Updated Hungarian translation 2016-02-26 09:14:53 +00:00
Руслан Ижбулатов
c61764b0f9 GDK W32: Fix the filling of MINMAXINFO
1) MSDN says that the coordinates of the maximized window
   must be specified as if the window was on the primary display,
   even if nearest display where it ends up is not the primary display.
   So instead of using nearest display work area verbatim,
   use it only to account for taskbar size, while using
   primary display top-left corner (0:0) as the reference point.
2) MSDN says that max tracking size is a system property, we
   should just call GetSystemMetrics() and use that.

https://bugzilla.gnome.org/show_bug.cgi?id=762629
2016-02-26 08:02:03 +00:00
Matthias Clasen
d3f713529a Document CSS win32 size support 2016-02-26 00:13:34 -05:00
Benjamin Otte
34e204952e win32 theme: Make titlebuttons look like they're the right size
This is a hack because we can't really rtesize the buttons.

Instead, we draw the background only over the area that they would
be drawn if they were drawn by Windows. The button is still selectable
outside of this area, but what can you do...
2016-02-26 03:20:42 +01:00
Benjamin Otte
ad204c88ca win32 theme: Fix decorations
... and draw them properly.
2016-02-26 03:20:42 +01:00
Matthias Clasen
5522ce9649 xi2: Add some more debug spew
Log the valuators we use or ignore.
2016-02-25 21:19:31 -05:00
Matthias Clasen
8b93c013c3 inspector: Simplify general tab setup
Factor out the code to create a listbox row with two labels,
and use it throughout.
2016-02-25 20:49:09 -05:00
Matthias Clasen
4f5f299266 inspector: React to device changes
Recreate the device section in the general tab when
devices come or go.
2016-02-25 20:28:23 -05:00
Matthias Clasen
5b2e883161 Remove redundant words from docs
An either without an or doesn't add anything.
2016-02-25 20:16:21 -05:00
Matthias Clasen
f749152efe Fix a copy-paste error 2016-02-25 20:12:53 -05:00
Matt Watson
a051e5677e widget-factory: transition pages
https://bugzilla.gnome.org/show_bug.cgi?id=762642
2016-02-25 19:49:45 -05:00
Benjamin Otte
5df1e98b2a window: Draw decorations in the right place
When we draw our own shadows, we need to offset the calls to render the
background to the border rectangle.
2016-02-25 23:21:29 +01:00
Matthias Clasen
09b1571093 Better baseline adjustment
The way we were adjusting baselines if min-height forces
a size increase was not quite working as intended. Redo
it in a simpler way: just split up the excess and count
half of it for above the baseline and half below.

This fixes button labels in dialogs appearing too low.
2016-02-25 16:36:13 -05:00
Matthias Clasen
a975e733dc fix a typo 2016-02-25 16:17:55 -05:00