322 Commits

Author SHA1 Message Date
David Capello
02ef2268fe Remove unnecessary filtering of key events in PopupWindow
In this way Tab key (and other focus movement keys) can be used
in PopupWindows. They aren’t propagated to the main window because
a correct filter was added in 883629b563ff36e4fb8bd1562f2cebf037bbc98a
2015-10-19 15:31:34 -03:00
David Capello
2a09990b16 Make viewport bigger when we load a new font on FontPopup 2015-10-16 18:51:35 -03:00
David Capello
74c2ce83dc Simplify update_mouse_cursor() code 2015-10-14 19:36:46 -03:00
David Capello
0900019b1e Minor change in Widget::scrollRegion() to avoid an extra Region::offset() 2015-10-14 18:41:56 -03:00
David Capello
fe6d2f3db0 Minor change in move_region.cpp 2015-10-14 18:39:07 -03:00
David Capello
bd1a1ffafb Add support to transport key modifiers from she events to UI messages
It’s better if we use the original key modifiers from she::Events (given
by Cocoa or Win32 APIs) instead of asking for the current state of
the modifier when the ui::Message is created (which can be different
from the original value).

This commit adds support to transport the modifiers, but it is not
using the original key modifiers yet.
2015-10-14 16:42:49 -03:00
David Capello
9e90061e37 Fix first native cursor hiding on Skia backend 2015-10-14 12:44:37 -03:00
David Capello
2fe612fd00 Add precise trackpad support on Skia/OSX port 2015-10-14 09:27:20 -03:00
David Capello
615e369cc4 Fix closing multiple tabs with middle-click without moving mouse (fix #826) 2015-10-13 12:13:13 -03:00
David Capello
5d9b7475e0 Add missing #include files 2015-10-02 10:54:15 -03:00
David Capello
a06e01ff7e Rename ui::Entry::EntryChange to ui::Entry::Change 2015-09-22 16:22:47 -03:00
David Capello
629bea41a8 Fix scroll in Preview window (fix #811)
Regression bug introduced in 9772f99303b5b6ab7cd0561c68bbe9de402ae814
2015-09-18 16:35:29 -03:00
David Capello
9772f99303 Add scroll bars to Timeline widget (fix #732)
Changes:
- Added ui::ScrollableViewDelegate so ui::ScrollBar can be child of
  a non-ui::View widget.
- Added a generic ui::setup_scrollbars() utility to locate
  horizontal/vertical scrollbars depending on the scrollable area and
  the available viewport area.
- Replaced Timeline::m_scroll_x/y ints with m_hbar/m_vbar widgets.
- Added transparent scrollbar look & feel.
- Added a "hover" state to mini-scrollbars used in sprite editors.
2015-09-17 15:19:47 -03:00
David Capello
182a094f2b Add some checks to Menu::closeAll() to avoid accessing null pointers
These are not reproducible situations, but we've received a crash
report that indicates that these pointers can be null if some
unknown scenario.
2015-09-16 10:52:02 -03:00
David Capello
e8abba1b93 Refactor some UI code
- Moved ui::GuiSystem from ui/base.h to ui/system.h as ui::UISystem
- Moved some internals to ui::details namespace
- Fix crash of UI tests when ~Manager is called
- Removed ui::init/exit_system() functions
2015-09-01 10:18:47 -03:00
David Capello
110aa74dae Add required #include "ui/timer.h" in ui/tooltips.h 2015-08-28 14:45:56 -03:00
David Capello
db4817e3ef Add an extra grid test with four columns 2015-08-28 13:11:00 -03:00
David Capello
530edb4ae3 Add Widget() constructor to create default widgets 2015-08-28 13:10:42 -03:00
David Capello
a79c9479b7 Replace dynamic_cast with static_cast in Widget::getRoot() 2015-08-25 14:40:53 -03:00
David Capello
746f41ff5b Rename ui::ListBox::ChangeSelectedItem to ui::ListBox::Change 2015-08-25 13:56:21 -03:00
David Capello
0645a66521 Fix pressing multiple KeyAction modifiers at the same time (fix #778) 2015-08-25 13:29:19 -03:00
David Capello
46309fe68d Focus Entry field when a Combobox receives the focus for first time
This is a partial revert of a0c2237839ff8a361de31ba0101caae9e7e53028 patch.
2015-08-24 16:45:35 -03:00
David Capello
04f07af173 Fix problem leaving dirty areas in the screen when we move a window 2015-08-24 11:56:40 -03:00
David Capello
a0c2237839 Fix hanging when switching focus between different editable comboboxes
This bug was fixed before with d1799c037abc011e79663892f52e0e2e0b5c5334 but
then returned with 549404c2166e2c78e841836efd6c543b0a8439ca
2015-08-24 11:37:35 -03:00
David Capello
549404c216 Fix tooltips visibility (fix #770)
TooltipManager uses filters to intercept a kMouseEnterMessage, if we
remove this kind of message for the TooltipManager itself (in sendMessage),
we never get that message so we never show the tooltip.

This problem was introduced in d1799c037abc011e79663892f52e0e2e0b5c5334
to fix a problem with comboboxes.
2015-08-24 11:33:02 -03:00
David Capello
de3d4c3662 Improve performance flipping the dirty region only 2015-08-24 10:14:25 -03:00
David Capello
9662c0cb90 Add Ctrl+Backspace and Ctrl+Del to ui::Entry field (fix #769) 2015-08-20 23:31:46 -03:00
David Capello
d1799c037a Fix hanging when switching focus between different editable comboboxes 2015-08-20 22:04:28 -03:00
David Capello
835fe40540 Fix problem detecting Timeline widgets when it's hidden 2015-08-20 09:09:49 -03:00
David Capello
4dc6da286e Add zoom slider in StatusBar (issue #420) 2015-08-14 19:46:48 -03:00
David Capello
d323b4affc Remove public variable members from ui::Theme class 2015-08-12 16:48:40 -03:00
David Capello
77d8024026 Fix bug with save/load progress bar: cannot be edited now
The ui::Alert slider to show progress is read-only now.
2015-08-12 16:10:20 -03:00
David Capello
847fc58a01 Fix UI problem navigating FileSelector using autocomplete and keyboard
With this fix, when the list of possible completions for a filename
is regenerated, we deselect the previously selected item. So the new
list appears without any item selected by default.
2015-08-12 15:17:53 -03:00
David Capello
6b9c4c53ae Add icons in "New Sprite" dialog
Some changes needed to do this:
* Added support to show icon+text in ButtonSet items
* Added an extra parameter in Graphics::drawUIString() to avoid drawing
  the underscore
* Fixed expansion of ButtonSet items when the grid is resized
* Added support for Alt+mnemonic shortcuts in ButtonSet items
2015-08-12 12:38:07 -03:00
David Capello
53a925e86d Remove SkinParts enum
Now we generate the list of SkinTheme parts from the skin.xml file using
the gen utility.

Several refactors included in SkinTheme class to simplify code.
2015-08-04 19:38:52 -03:00
David Capello
32b12d17da Fix visual artifacts on Windows when the window is resized
Now when the user resizes the OS window (a she::Display), it generates
a kDisplayResize she::Event, and this is processed by the UI layer to
redraw the entire ui::Manager.

With this change we remove the obscure "bool" return value in
she::Display::flip() member function.
2015-07-30 16:15:21 -03:00
David Capello
f2d5242ff3 Redraw the entire ui::Manager after resizing
Regression introduced in dd94925cf7cde621307ae5570e890be36c789831
2015-07-30 10:34:39 -03:00
David Capello
dd94925cf7 Move display flip logic to ui library (ui::Manager class) 2015-07-29 18:12:35 -03:00
David Capello
9ca83e2624 Add support to include any kind of widget inside a Menu 2015-07-29 12:32:01 -03:00
David Capello
de3d408581 Unhighlight menu items when the mouse leaves them 2015-07-29 11:42:57 -03:00
David Capello
a7ea0f7ec5 Add "Snap to Grid" indicator when it's enabled (fix #122) 2015-07-28 13:05:59 -03:00
David Capello
55f90d8b8b Add target_link_libraries() for sublibraries
With this change we remove some internal variables/lists like sys_libs,
libs3rdparty, etc. And we fix dependencies problems between targets.
2015-07-13 12:16:55 -03:00
David Capello
803d9e7a17 Fix minor glitch with Eraser brush preview when Timeline is switched with Tab key 2015-07-06 12:05:24 -03:00
David Capello
48a1af7342 Revert "Make Manager::freeMouse() to select a new visible widget"
This reverts commit 3accd85662972ea0e70e28b2177d79054fbfe7de.
2015-07-03 13:43:05 -03:00
David Capello
3accd85662 Make Manager::freeMouse() to select a new visible widget
In this way we generate a SetCursor message when a widget is hidden.
2015-06-29 15:46:08 -03:00
David Capello
0b0cb56c1e Replace some UI_FOREACH_WIDGET() with range-based for loops 2015-06-29 15:42:34 -03:00
David Capello
b12e6c3398 Add ui::MenuSeparator widget 2015-06-24 13:14:41 -03:00
David Capello
e4df25f4df Merge ui::Widget::m_align with m_flags field
Here we remove Widget::setFlags() member function, as it's not used.
2015-06-24 12:06:33 -03:00
David Capello
e6d22e7e38 Reimplement Box resize algorithm 2015-06-23 22:46:05 -03:00
David Capello
a2538628c7 Convert ui::Widget::border_width/child_spacing to private fields 2015-06-23 19:20:49 -03:00