Commit Graph

2069 Commits

Author SHA1 Message Date
David Capello
3322396357 Minor fixes 2014-04-20 17:41:59 -03:00
David Capello
47ee01c1a0 Proper handling of HRESULTs 2014-04-20 17:41:49 -03:00
David Capello
a35cb0d34d Fix compilation errors (gcc) 2014-04-19 21:06:58 -03:00
David Capello
b36cff8d75 Add missing #include <string> 2014-04-19 21:06:35 -03:00
David Capello
019c7c9f1f she_alleg4: Define unique_display and display_scale on all platforms 2014-04-19 21:06:07 -03:00
David Capello
bc32c18dbb Fix PalettePopup::showPopup signature 2014-04-19 21:03:50 -03:00
David Capello
bf03d10b03 Remove extra elements in #endif directives 2014-04-19 21:03:20 -03:00
David Capello
bc3d3e9413 Load a better palette by default 2014-04-19 20:52:56 -03:00
David Capello
5ba85c01dc Improve "Load" button label in PalettePopup to know what it does when there is no active document 2014-04-19 20:52:36 -03:00
David Capello
2c0642d1f1 It's better if mouse wheel doesn't center the scroll on zoom-in/out 2014-04-19 20:43:23 -03:00
David Capello
223988d7ff Center on zoom (fixed issue #385) 2014-04-19 20:09:14 -03:00
David Capello
4c706afb90 New zoom tool 2014-04-19 20:08:21 -03:00
David Capello
1ab7de6668 Adjust some skin colors in filelist and selected background 2014-04-19 19:04:45 -03:00
David Capello
3738774efc Do not apply jguiscale() to Splitter layouts that are handled ByPercentage 2014-04-19 18:57:42 -03:00
David Capello
a34d181530 Add Widget::is/setTransparent property to paint a widget merged with its background
This fixes problems with tooltips, toolbar popups and context bar popups.
It fixes issue #297 (undo notifications rendering problems).
2014-04-19 18:51:42 -03:00
David Capello
2b3a4d1668 Paint PopupWindow as popup menus 2014-04-19 16:07:01 -03:00
David Capello
af4e714360 More painting code from ji_screen to ui::Graphics
We planned to migrate everything to ui::Graphics to port the program to
other back-end (e.g. SDL or Allegro5). This is one step forward to that
direction.

Changes:
- Delete a lot of deprecated functions from src/ui/draw.h/cpp and SkinTheme
  that used BITMAP/ji_screen.
- Rename ui::ji_move_region to ui::_move_region
- Move ui::jwidget_get_texticon_info to ui::Widget::getTextIconInfo.
  Now the member function returns client coordinate instead of absolute
  ones.
- ui::drawTextBox() now receives a ui::Graphics instead of a BITMAP
- Add ui::Graphics::drawChar/measureChar() member functions.
- Replace ui::jrectexclude() with with ui::Graphics::fillAreaBetweenRects()
2014-04-19 15:18:16 -03:00
David Capello
4beff46e02 We were calling dispatchMessages() on openPopupWindow(), which produces some messages that were deleting the toolstrip
We cannot use the "overlapped area" trick to draw the background of the
window. It's better to add a new "composite" kind of window.
2014-04-17 22:52:26 -03:00
David Capello
486b82e122 Palettes are distributed with .gpl format now 2014-04-17 22:33:06 -03:00
David Capello
9ad86ef0ed Toolbar: Remove slot before the popup window is deleted
This fix some strange scenario/bug where slots iterators where invalidated
in the middle of the signaling process. (The whole signal/slot impl needs
a review/simplification.)
2014-04-17 22:30:07 -03:00
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