Commit Graph

2199 Commits

Author SHA1 Message Date
David Capello
dd2ce20e25 Win32: Add support to convert mouse messages (WM_) to ui::Messages (using she::Events)
On Windows, instead of polling Allegro mouse position/buttons we can use
the mouse messages (WM_*) directly to generate she::Events. Those events
are received by the ui::Manager and converted to ui::Messages.
Maybe this is a possible fix for issue #133 (Wacom tablets don't work
properly).

Changes:
- Don't use jmouse_z() directly (new ui::MouseMessage::wheelDelta() member)
- Add ui::_internal_set_mouse_position() to change the jmouse_x/y(0)
  from the new mouse position received in she::Events. The same for
  ui::_internal_set_mouse_buttons().
- Modify the ui::Manager to generate mouse events in any case: using old
  Allegro 4 polling method, or from she::Events.
2014-04-17 22:23:12 -03:00
David Capello
2e9751fef1 Rename base::file/directory_exists() to base::is_file/directory() 2014-04-17 17:12:55 -03:00
David Capello
138d2f1db8 Fix mouse buttons on kMouseDown/UpMessages
This fixes a problem reported on issue #388 where a tool loop couldn't
be canceled pressing left button when it was iniciated with right button.
2014-04-17 17:06:15 -03:00
David Capello
d3591ffdf7 Merge branch 'dev' of git@github.com:aseprite/aseprite.git into dev 2014-04-17 16:24:53 -03:00
David Capello
7989cd81bb Avoid drawing text over widget borders in SkinTheme::drawTextString() 2014-04-17 16:24:04 -03:00
David Capello
05507408e1 Remove hardcoded value from main_window.xml for the color bar splitter 2014-04-17 16:23:09 -03:00
David Capello
330602a78c ColorBar: change default FG/BG colors to white and black (RGB) 2014-04-17 16:22:46 -03:00
David Capello
e63831c87f ColorBar: Show 8 columns by default 2014-04-17 16:22:21 -03:00
David Capello
50369242ee Change the style of scroll bars in ColorBar 2014-04-17 16:21:52 -03:00
David Capello
f9612eb666 Merge branch 'dev' of git@github.com:aseprite/aseprite.git into gfx 2014-04-17 16:13:55 -03:00
David Capello
3dfc07b724 Remove ui::jwidget_set_border() function 2014-04-17 15:55:55 -03:00
David Capello
ff277dccf7 Add Widget::onSetColor() 2014-04-17 15:46:01 -03:00
David Capello
ed5a2d9570 Replace jwidget_noborders() with Widget::noBorderNoChildSpacing() 2014-04-17 15:44:33 -03:00
David Capello
c16ea3e8a2 Use Graphics object in ImageView::onPaint() 2014-04-17 15:27:45 -03:00
David Capello
6ca003feb0 Do not show empty tabs area in Tabs widget 2014-04-17 14:47:28 -03:00
David Capello
6ad54689dd PaletteView: Apply jguiscale() to initial m_boxsize 2014-04-17 14:46:23 -03:00
David Capello
defc703208 Fix Splitter::onLoad/SaveLayout() to support jguiscale() changes 2014-04-17 14:44:21 -03:00
David Capello
ab53c81a75 Minor fix in Tabs when close button in each tab is enabled
Anyway the close button doesn't work at this moment.
2014-04-17 14:39:29 -03:00
David Capello
f04bca8553 Fix DropDownButton::m_button style (left-align text and expansive widget) 2014-04-17 14:38:48 -03:00
David Capello
3466d17d27 Drop down button in ColorBar switches (open/close) the PalettePopup 2014-04-17 14:38:21 -03:00
David Capello
9ee1da15db Rename she::NotDisposableSurface to she::NonDisposableSurface 2014-04-17 14:23:43 -03:00
David Capello
6b53e46108 Do not fail if the default palette cannot be loaded 2014-04-17 13:48:33 -03:00
David Capello
113d0d4df9 Add pixel art palettes
From Richard 'DawnBringer' Fhager and Arne Niklas Jansson.
2014-04-17 01:38:13 -03:00
David Capello
a2753fd898 Add missing OVERRIDE modifier to OpenFileCommand member functions 2014-04-17 01:35:31 -03:00
David Capello
c8c8738ef8 Add PalettePopup in ColorBar to load predefined palettes from data/palette/
- Add PalettesLoader helper class to load palettes in background
- Add PaletteListBox widget
- Add PalettePopup widget
2014-04-17 01:35:02 -03:00
David Capello
283d883d37 Add SetPaletteCommand 2014-04-17 01:29:58 -03:00
David Capello
2b7bd3e831 Add base::concurrent_queue: a really simple concurrent queue
- Add base::scoped_unlock
2014-04-17 01:25:09 -03:00
David Capello
a8d39e588a Add raster::Palette::addEntry() and load .gpl files using this addEntry
At the moment the program doesn't support palettes with less than 256
colors. But at the future the idea is to load the number of colors that
the palette says.
2014-04-17 01:20:46 -03:00
David Capello
50a10a9056 Add filename to raster::Palette (this will be useful to know the original location of a palette) 2014-04-17 01:19:22 -03:00
David Capello
811a530013 base::open_folder: add support to open a folder/directory
Before this we were capable to open/locate a file inside a folder.
2014-04-17 01:18:24 -03:00
David Capello
ad4e08c8f5 Fix issue 98: The mini editor blacks out part of the screen when viewing an animation 2014-04-13 22:57:59 -03:00
David Capello
17adf56337 Fix issue 356: tooltips cause selecting tools require 1 or more extra mouse clicks
This is an old bug in the ui::Manager. We don't need to "free" (release)
the mouse widget when we re-stack windows order (e.g. because the user
clicked the non top-most window).
2014-04-13 22:47:40 -03:00
David Capello
4e7a084ced Remove unnecessary calls in TipWindow 2014-04-13 22:17:36 -03:00
David Capello
b00a187fba Free the right widget in removeChild() (we've to free "child" instead of "this") 2014-04-13 22:17:00 -03:00
David Capello
39e6f2dbe6 Report Manager::setMouse() calls if REPORT_EVENTS is defined 2014-04-13 22:16:20 -03:00
David Capello
0274e13075 Improve REPORT_EVENTS in manager.cpp to show the Widget type (using typeid) 2014-04-13 21:33:09 -03:00
David Capello
c387d330e6 Make hot-region bigger for ToolStrip popup 2014-04-13 21:20:32 -03:00
David Capello
cd464f6694 Fix tooltip flicker on ToolBar 2014-04-13 21:20:06 -03:00
David Capello
31e1b4e387 Close all TipWindow automatically on click 2014-04-13 20:40:44 -03:00
David Capello
47c92fb755 Fix REPORT_EVENTS in manager.cpp 2014-04-13 20:39:59 -03:00
David Capello
c9bda7b329 Implement TipWindow in terms of PopupWindow 2014-04-13 19:35:15 -03:00
David Capello
312aca755e Fix issue 333: Tool Selection Icons Flicker
- Add PopupWindow::ClickBehavior
2014-04-13 19:25:06 -03:00
David Capello
49844267a5 ToolBar: Now we can press-move-release mouse to select tools over different ToolStrips 2014-04-13 17:34:02 -03:00
David Capello
5567e3dfc5 main_window.xml: Give more space to the ContextBar 2014-04-13 16:35:11 -03:00
David Capello
8dc869e1de Move drawing code of PaletteView widget from kPaintMessage to onPaint() 2014-04-13 16:26:00 -03:00
David Capello
b41841ddd2 Move drawing code of EditorView from kPaintMessage to onPaint() 2014-04-13 15:08:24 -03:00
David Capello
a0e403b6a6 Move drawing code of FileList from kPaintMessage to onPaint() 2014-04-13 15:06:30 -03:00
David Capello
f964b020dd Don't hide the MiniEditorWindow automatically if zoom is 1:1
As now the mini editor has an animation preview, it makes sense to
have the mini editor whatever the current editor zoom is.
2014-04-13 14:29:54 -03:00
David Capello
23292edf0c Move drawing code of ToolBar from kPaintMessage to onPaint() 2014-04-13 14:16:29 -03:00
David Capello
e310ef1428 Change StatusBar colors 2014-04-13 13:51:28 -03:00