Commit Graph

27 Commits

Author SHA1 Message Date
Jehan d339aef75c app: add icon size auto-guess from monitor resolution.
Current code only guess resolution for a single monitor. Ideally
the widget sizes could be different depending on the window where a
given widget is on. But that's a start.
2017-03-21 17:52:22 +01:00
Jehan e29e950ca8 app: make sure signal connections are disconnected later. 2017-03-12 18:36:16 +01:00
Jehan 324e1a28b0 app: completely minor typo in function parameter. 2017-03-12 17:14:46 +01:00
Jehan 0753296b6c app: remove unused gimp_tool_palette_initialize_tools().
The function has been unused since commit b5cc2a9.
Its work is now divided into gimp_tool_palette_set_toolbox() and
gimp_tool_palette_hierarchy_changed().
2017-03-12 17:14:38 +01:00
Jehan cfae83623c Bug 745835 - Small icons as Option, not theme
Allow overriding icon sizes set in themes from the preferences.
This initial commit updates only toolbox icons. More to come.
4 options are available: small, medium, large and huge (the later would
likely be useful for HiDPI screens).
Uses a new widget GimpIconSizeScale.
2017-03-11 02:51:59 +01:00
Jehan 52ad5bb2a1 app: remove focusability of toolbox buttons.
Commit c83ee61 got overridded by commit b5cc2a9.
Reintroducing the changes.
2016-11-28 15:55:03 +01:00
Michael Natterer b5cc2a977f Bug 768966 - Keyboard Shortcut hint disappears from tooltips...
...after entering single window mode

In GimpToolPalette, implement GtkWidget::hierarchy_changed() and
re-set the tooltips using the new toplevel's actions.

In gimp_widget_set_accel_help(), make sure we don't connect to the
same action twice, and make sure we disconnect everything if either
the widget or the accel_group go away.
2016-09-10 00:26:23 +02:00
Jehan c83ee61c07 Bug 729765 - remove focusability of various widgets...
... starting with toolbox buttons.
This is particularly a problem in single window mode (and sometimes in
multi-window mode) where canvas easily loses focus, hence key events.
2016-08-14 01:47:56 +02:00
Michael Natterer 9cb81db026 app: actually use named icons for the toolbox icons 2014-05-08 19:00:18 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
Michael Natterer 843866e7e7 app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:

- pass integer monitor numbers around in all places where we already
  pass around a GdkScreen. Pass the "current" monitor to these changed
  APIs, where "current" is either the monitor where the action-triggering
  widget is, or if that is unavailable the monitor where the mouse is.

- add gimp_widget_get_monitor() in order to easily get to the monitor,
  just like gtk_widget_get_screen().

- add screen and monitor parameters in some places that were missed
  before.

- in sessionrc, save all window positions relative to the window's
  monitor, and save the monitor separately, if it's not the screen's
  primary monitor.

- when restoring window positions, use the stored monitor when the new
  prefs options says so (use the screen's primary monitor if there is
  no stored monitor), otherwise use current monitor that is now passed
  around.
2014-05-02 03:01:23 +02:00
Michael Natterer e1bfc0a362 Bug 688537 - Toolbox occasionally has spaces or tool names after the icons
Explicitly set the toolbox' style to GTK_TOOLBAR_ICONS to protect it
from user toolbar preferences.
2013-05-17 14:42:43 +02:00
Michael Natterer 7e273bc6d0 Bug 686929 - Newly created toolbox is too tall and too narrow
Set the dock window's geometry hints after the tool palette's style is
known, not after the toolbox' style is known, so we get the right tool
button dimensions for minimum size and size increments.
2013-01-17 19:37:03 +01:00
Michael Natterer 819ad3b4d9 app: use g_object_bind_property() to set widget visibility
instead of connecting to "notify::boolean-property" of something just
to set "widget::visible" in the callback.
2012-10-31 23:17:47 +01:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer cac442c2df app: port dockable showing in widgets/ to GimpWindowStrategy 2012-01-30 23:52:59 +01:00
Michael Natterer 4c9a2f1729 app: remove trailing whitespace in GimpToolPalette 2011-08-21 17:43:39 +02:00
Martin Nordholts a5ef51137d Revert "app: #include "gimptoolpalette.h" in gimptoolpalette.c"
This reverts commit c19560b08c.
It was already included, don't know how I could miss that.
2011-08-09 19:52:35 +02:00
Martin Nordholts 2fd159ae06 app: Only initialize tools once 2011-08-07 20:49:49 +02:00
Martin Nordholts 1a8a806d43 app: Make GimpToolbox use parent UI manager
Make GimpToolbox and GimpToolPalette use the GimpUIManager and
GimpDialogFactory of the top container instead of holding references
on their own. If they hold references on their own, we need to update
these when we move e.g. GimpToolbox between different top level
containers such as GimpDockWindow and GimpImageWindow. Failure to do
this cased problems talked about in bug 646794 (case 2).
2011-08-07 20:00:28 +02:00
Martin Nordholts 77ac7ffa90 app: Add gimp_tool_palette_initialize_tools() 2011-08-07 20:00:05 +02:00
Martin Nordholts c19560b08c app: #include "gimptoolpalette.h" in gimptoolpalette.c
It's just weird not to.
2011-08-07 20:00:05 +02:00
Martin Nordholts a5029b8c4c app: Remove dead GimpToolPalette code 2011-08-07 18:02:55 +02:00
Michael Natterer a598b2d1be app: I don't know what I was thinking when changing these function names... 2010-11-20 20:37:15 +01:00
Michael Natterer 74a09704ba app: some toolbox cleanup
Add precondition checks and assertions for needed members and remove
unused API.
2010-11-20 15:19:48 +01:00
Michael Natterer e4a96c738e app: factor out duplicated code to gimp_tool_palette_get_button_size()
and use that function in GimpToolPalette and GimpToolbox.
2010-11-20 10:20:52 +01:00
Michael Natterer 281969b45d app: add GimpToolPalette which derives from GtkToolPalette
and move all of GimpToolbox' tool button code there.
2010-11-19 23:52:09 +01:00