e1a03ead7a
Use NULL for generic marshallers in g_signal_new()
...
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
a985e62b25
Use gtk_popover_popdown/popup where appropriate
...
https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
8701e34f74
port to new gtk_menu_popup_at_* () functions
...
https://bugzilla.gnome.org/show_bug.cgi?id=756579
2016-07-19 09:38:54 -04:00
4dbe7c99c2
entry: Fix undershoot position wrt entry icons
...
Draw them inside of the icons, which is where the text scrolls.
2016-05-31 09:41:08 +02:00
301652de1f
Remove useless casts from gdk_event_triggers_context_menu calls
2016-05-12 20:39:51 +02:00
b5fb9ae3b7
gtk: Port to new monitor api
...
Use the GdkDisplay monitor api instead of the GdkScreen one.
2016-04-27 23:18:16 -04:00
511f138328
entry: port to progress tracker
2016-04-08 16:09:30 -07:00
2fee5fbda7
entry: Fix drag highlight problems
...
We don't want drag highlights around icons or progress, so don't
propagate the :drop(active) state to them.
2016-03-11 08:02:10 -05:00
6b2cde94b4
entry: Make progress node invisible when appropriate
...
We were failing to do that, leading to progress not disappearing
anymore after it was initially shown, in the gtk3-widget-factory
entry progress example.
2016-03-04 08:04:45 -05:00
cf71d98b05
entry: Make the get_text_area() vfunc relative to top left of entry
...
This fixes GdTaggedEntry. I hope.
2016-02-23 04:22:19 +01:00
966dd56e45
entry: Fix baseline allocation
...
Position the text on the baseline again.
2016-02-20 18:55:17 -05:00
d2fb069426
entry: Make get_text_area_size() vfunc work again
...
GdTaggedEntry needs that. Though there's probably a bunch of work left
inside GdTaggedEntry to make it look cute again (like storing the area
it reserves for itself to allocate tags in).
2016-02-20 03:25:39 +01:00
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
c95087c70a
entry: queue an allocate when pulsing
...
We need to reposition the progress gadget and that's done during
allocation.
2016-02-04 12:25:13 +01:00
429bec54e5
entry: Turn progress node into a gadget
2016-02-03 22:53:22 +01:00
3316d69abb
entry: Simplify drawing code
2016-02-03 22:53:22 +01:00
bfb727d37e
entry: Draw progress in the right place
2016-02-02 15:26:01 +01:00
6e2c551896
entry: Fix icon areas
...
Do the same thing we already do in gtk_entry_get_text_area.
2016-01-31 20:05:52 +01:00
09677f7331
entry: Fix a typo
2016-01-27 14:29:40 +01:00
c4f7fbecfa
entry: Fix a case of disagreeing coordinate systems
...
gesture_get_current_point() returned x/y in layout coordiantes, but
callers assumed it in textarea coordinates.
2016-01-27 14:04:21 +01:00
a9222146d3
entry: give a visual clue that content is scrolled
...
This has been requested long ago, and we now have the
machinery to implement it easily.
2016-01-26 23:36:18 -05:00
a222aa66d5
entry: Compute selection range correctly
...
gtk_editable_get_selection_bounds() returns UTF-8 character offsets,
but gdk_pango_layout_get_clip_region() wants byte ranges, so convert
from one to the other.
With English, this is especially visible for passwords, which use ●
as the invisible character.
https://bugzilla.gnome.org/show_bug.cgi?id=761128
2016-01-27 02:11:06 +01:00
fefc370f6c
entry: Chain up in realize()
...
... instead of copy/pasting what gtk_widget_real_realize() does.
2016-01-26 15:53:56 +01:00
ad7bbbf9d8
entry: Use cleverer method to get the entry node
2016-01-25 15:49:17 +01:00
3982f05be4
entry: Move spinbutton size hack
...
If we want to do special sizing for the text, we need to do it for the
text. Otherwise paddings, borders and entyr icons will screw up
everything.
2016-01-25 15:49:17 +01:00
02fab14b3b
entry: Move code
...
This movement is necessary for future gadgetization of GtkSpinButton.
2016-01-25 15:49:17 +01:00
b52b4068af
entry: Redo textarea handling
...
(1) Keep priv->text_allocation for the area used by the text
(2) Compute all text coordinates with the help of priv->text_allocation
As a side effect the get_text_area_size and get_frame_size vfuncs are
now unused. If we wanted them back, they should get a single use durig
size_allocate() and then their results should be stored for further
processing.
2016-01-25 15:49:17 +01:00
c709072567
entry: Use gtk_render_layout()
...
It's funny that nobody has yet noticed that we don't draw the text using
the theme.
We had no text-shadow in entries!!!!!
2016-01-25 15:49:17 +01:00
a363fd5fd3
entry: Draw selection the same way as GtkLabel
2016-01-25 15:49:17 +01:00
ca690162af
entry: Fold function into only caller
2016-01-25 15:49:17 +01:00
0ae8b30210
entry: Don't allow different text over progress
...
This complicates refactorings, so remove that feature. It's not used
anywhere and doesn't play well with nodes the way it's implemented.
If we want it back, we can add it back later.
2016-01-25 15:49:17 +01:00
a6845091f9
spinbutton: Make the entry gadget be the entry's gadget
...
This is a big and somewhat evil hack: We replace the entry's gadget's
node with the spinbutton's entry node.
2016-01-22 13:46:01 +01:00
b08fe985cc
entry: Expand the css node docs
...
Mention the context menu.
2016-01-18 10:52:26 -05:00
d73f6b8c50
entry: Deprecate shadow-type
...
Things like that should be handled using css. Also, the property value
is unused inside GtkEntry.
2016-01-18 12:53:53 +01:00
a5fabee202
entry: Don't draw icons twice
2016-01-14 16:02:12 +01:00
49d251a330
entry: Remove unused code
2016-01-14 16:02:12 +01:00
ea4cff1ea4
Use convenience API that was introduced recently
...
Use gtk_css_gadget_set_state in all the places where we previously
were getting a node from a gadget, just to call gtk_css_node_set_state.
2016-01-13 00:19:31 -05:00
19fa893067
entry: typo
2016-01-12 21:54:45 +01:00
c3d611fcf2
entry: Fix typo
2015-12-20 11:52:30 -06:00
18e8842a7e
entry: Don't clear when setting icons
...
Clearing the icon doesn't appear to be necessary with
todays code, and it has the unfortunate side-effect of
temoorarily hiding the icon's window, which breaks grabs
and makes us miss the button release event when the icon
is changed from a button press handler.
2015-12-18 19:38:07 -05:00
51ba8421c3
entry: Remove some dead code
...
These defines are no longer used.
2015-12-18 10:55:26 -05:00
2e25407638
Fix a problem with entry gadgets
...
place_windows is accessing the gadgets allocation, so make sure
to allocate the gadget before calling it.
2015-12-17 15:17:23 -05:00
35c243b26f
entry: use a gadget
...
Use a gadget for the entry. Selection and progress still
just use a CSS node. Most things seem to work correctly
with non-zero margin or padding.
2015-12-17 00:01:58 -05:00
3a77da9df2
entry: Turn icons into gadgets
2015-12-15 08:41:16 -05:00
b79a187d47
iconhelper: Handle invalidation
...
When CSS, direction or scale factor change, handle the invalidation
inside the iconhelper.
This way the widgets using them don't have to.
2015-12-15 08:41:16 -05:00
ad22612ab2
iconhelper: Require passing a cssnode to the constructor
...
Note that we don't use it yet.
2015-12-15 08:41:16 -05:00
ccfc4d3f12
iconhelper: Remove the context argument
...
Instead, use the widget's context.
2015-12-09 13:30:40 +01:00
e95e2d5048
iconhelper: Get rid of _gtk_icon_helper_set_window()
...
Instead use the window of the owner widget.
2015-12-09 13:30:40 +01:00
c9d1a45d30
iconhelper: Require a widget as construction argument
...
Note that the caller needs to ensure the widget lives as long as the
iconhelper as the iconhelper will not ref the widget.
2015-12-09 13:30:40 +01:00
f76fa0411f
entry: Always use cursor names
...
The names are the preferred API for cursors, so use it.
2015-12-05 19:17:52 -05:00