Commit Graph

2281 Commits

Author SHA1 Message Date
David Capello
a6a383ebc8 Fix SkinTheme::paintView() to avoid the little white square in ListBox's bottom-right corner 2014-04-26 11:33:05 -03:00
David Capello
b7de0a9547 Don't reload the theme when the palette is modified
This was needed in the old days for 8bpp screens.
2014-04-26 11:22:21 -03:00
David Capello
6fa7abb812 Fix EditorView scrollbar painting code for the little square in the bottom-right corner 2014-04-26 11:16:49 -03:00
David Capello
15a3b6ac2c Fix double-click issues
- Fix double-click behavior when double-clicks are generated from
  Manager::generateMouseMessages().
- Add Widget::setDoubleClickeable/isDoubleClickeable() member functions
  for widgets that accept double-clicks.
2014-04-26 11:09:59 -03:00
David Capello
5d824512c2 Fix SkinTheme::paintMenuItem() painting code 2014-04-25 08:59:00 -03:00
David Capello
af299eecc8 Hide mouse when it leaves the display 2014-04-25 08:58:19 -03:00
David Capello
95fbfd9fe7 Add a mutex to access to the FileSystemModule 2014-04-24 08:51:59 -03:00
David Capello
b467e57ba3 Update the PaletteListBox view to show the scrollbar when palettes are added 2014-04-24 08:49:52 -03:00
David Capello
a711c8be17 Fix throw of exceptions in FileSystemModule ctor 2014-04-21 23:30:04 -03:00
David Capello
6634c12ad2 Fix problem selecting Default Ink each time we want to show other ink type 2014-04-21 22:23:22 -03:00
David Capello
3c4bbbe30c Replace jwidget_set_min/max_size() with Width::setMin/MaxSize() 2014-04-21 22:15:29 -03:00
David Capello
b33357ed46 Remove base::string (std::string is good enough for utf8 strings) 2014-04-20 19:53:27 -03:00
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