Commit Graph

568 Commits

Author SHA1 Message Date
David Capello
105d389fdc Remove list of recipients from ui::Message 2018-12-13 10:11:56 -03:00
David Capello
ab9883e260 Avoid running ui::Entry timer when it's not needed 2018-12-12 13:27:24 -03:00
David Capello
3b810701ce Minor change in Timer::stop() to avoid calling removeMessagesForTimer() when it's not necessary 2018-12-12 13:26:35 -03:00
David Capello
92330adc30 Avoid busy-waiting when a menu item is clicked
When a menu item is clicked a kExecuteMenuItemMessage is enqueued, so
the msg_queue will not be empty until we exit the menu item
callback (MenuItem::onClick()). This will prevent us to use a
os::Event::getEvent() where we can wait the OS for the event (see that
Manager::generateMessagesFromOSEvents() checks that msg_queue must be
empty to block the thread for OS events).
2018-12-12 00:40:39 -03:00
David Capello
21544bb666 Remove unused function Manager::removeMessage() 2018-12-12 00:27:54 -03:00
David Capello
53f2b4a121 Don't go to sleep if there are delayed painting messages 2018-12-12 00:26:28 -03:00
David Capello
e0b246dd87 Remove unused function Message::prependRecipient() 2018-12-12 00:24:27 -03:00
David Capello
f6a2090ed9 Fix bug losing the ui::DIRTY flag from the ui::Manager after closing a fullscreen ui::Window 2018-12-04 17:44:21 -03:00
David Capello
0a179acc90 Minor change in Widget::invalidate*() funcs to use onInvalidateRegion() 2018-12-04 17:32:01 -03:00
David Capello
4790e3845a Fix regression introduced in 767897d665
In some cases we have to enable the DIRTY flag in the hierarchy.
Reproducible case: right-click a tab with an image, open in a folder,
then right-click the tab again.
2018-12-04 12:54:40 -03:00
David Capello
e3dc8fa3a6 Minor change 2018-12-04 12:51:56 -03:00
David Capello
2ffb708be8 Move Manager::invalidateDisplayRegion() to Manager::onInvalidateRegion() 2018-12-03 23:59:42 -03:00
David Capello
767897d665 Set DIRTY flag on Widgets without going to all parents 2018-12-03 22:16:00 -03:00
David Capello
e516d26fa8 Fix glitch showing/hiding Preview window with the toolbar button on sprites with canvas size > Preview window viewport 2018-11-28 12:02:57 -03:00
David Capello
9af7366662 Fix bug redrawing the area occupied by the window when it's destroyed 2018-11-28 10:35:13 -03:00
David Capello
0ab7f45c35 Update ui/README file 2018-11-28 10:34:35 -03:00
David Capello
aea8e9cd83 Fix combobox size hint when using some user themes
From: https://community.aseprite.org/t/2276
2018-11-26 16:46:02 -03:00
David Capello
9b2889ef66 Fix issue with overlays on macOS w/the new async painting (fix #1931)
Fixed regression introduced in d20436f957.
Now overlays are kept on the screen and the overlapped area is restored
just in time when we have to re-paint some widget on that area.
2018-11-15 15:42:50 -03:00
David Capello
d32d8bf938 Fix color problems with overlays (fix #1914)
There were two problems:
1) Overlays weren't using the screen color space, so restoring the
   pixels were modifying the original saved area
2) A custom cursor (when "Use native cursors" option were enabled) was
   using overlays, when we could use a native custom cursor
   anyway (without overlays)
2018-10-31 11:10:44 -03:00
David Capello
4487c3d35f Check that we're calling the Widget::invalidate() from the ui thread 2018-10-25 17:29:07 -03:00
David Capello
bccd3f1bf8 lua: add Dialog() 2018-10-11 12:01:21 -03:00
David Capello
f604ac95dd lua: add app.alert() function 2018-09-07 16:42:58 -03:00
David Capello
798d6df5ff Add File > Scripts menu 2018-09-05 13:35:13 -03:00
David Capello
039e064d6b ui library doesn't depend on pixman directly
ui-lib depends on laf-gfx which already depends on pixman.
2018-08-29 10:23:15 -03:00
David Capello
efffde5673 Wait for OS messages when is possible
With this change we will reduce the CPU and energy consumption levels
as now we can go to sleep when there is no OS messages left and no
timers running.
2018-08-17 22:09:34 -03:00
David Capello
c6a5982c26 Don't call flushRedraw() when moving scroll
It looks like we don't need this call anymore (maybe it was there for
the Allegro port).
2018-08-17 16:45:57 -03:00
David Capello
4fb66b6a10 Use drawSurface() instead of drawRgbaSurface() to draw the render 2018-08-17 16:30:03 -03:00
David Capello
6b7aec27b7 Improve ui::move_region() performance for regions with more than 1 rectangle 2018-08-16 20:46:36 -03:00
David Capello
72fb45aede Minor change (auto& -> const auto&) 2018-08-16 20:45:14 -03:00
David Capello
220d043873 Discard enqueued kWinMoveMessage messages (fix #1006)
When we're moving or resizing a window, sending several
kWinMoveMessage doesn't make sense. So we discard all kWinMoveMessage
and re-enqueue a new one with the latest window bounds.
2018-08-16 15:55:46 -03:00
David Capello
a6fab8d1d9 Move os/ft/gfx libraries to laf 2018-08-09 16:36:11 -03:00
David Capello
5cb2d984f0 Rename she -> os 2018-08-09 12:58:43 -03:00
David Capello
f9c1c68012 Remove Allegro back-end (#139) 2018-08-09 11:43:35 -03:00
David Capello
f2ed45e795 Replace base::UniquePtr -> std::unique_ptr 2018-08-08 17:27:26 -03:00
David Capello
7c19744798 Add some checks in ui/manager.cpp to report messages correctly 2018-07-04 14:27:13 -03:00
David Capello
6b1c884eb5 Add code to check integrity of backups 2018-07-04 12:35:15 -03:00
David Capello
3e0ebd34c9 Fix macOS bug executing commands from other native menu instead of the open aseprite menubox when we use mnemonics 2018-06-29 12:14:54 -03:00
David Capello
f595ceea7f Add possibility to write math expression in number textboxes (fix #1762) 2018-06-28 13:33:13 -03:00
David Capello
56ec9f113c Avoid crash if the theme package doesn't contain a sheet.png file 2018-06-25 14:05:57 -03:00
David Capello
511752fea7 New render engine to use bicubic interpolation when zoom < %100 (fix #1671)
This only works with Skia back-end.
2018-06-22 15:41:22 -03:00
David Capello
ddff5d559c Keep focus of layer name when right-click a layer > Properties (fix #1466) 2018-06-19 15:25:49 -03:00
David Capello
867b42d7ed Minor change in listbox.cpp to avoid gcc warnings 2018-06-06 16:36:59 -03:00
David Capello
7a35eb26a1 Add new pref="" attribute to <check> widgets to bind check boxes with bool preference options automatically
With this change we've moved the propagateToChildren/propagateToParent
flags from ui::KeyMessage to ui::Message so anykind of
message (e.g. user defined messages like kSavePreferencesMessage) can
use these flags (processed by ui::Widget::onProcessMessage()).
2018-06-06 16:35:02 -03:00
David Capello
0f51467768 Fix my common typo "completelly" instead of "completely" 2018-05-24 14:21:00 -03:00
David Capello
a845b098d9 Minor changes in ui/system.cpp 2018-05-24 13:12:01 -03:00
David Capello
40968891f2 Add option to disable native clipboard
This is related to #1100, as the Linux port is not well tested and may
fail, it's good to have an option to disable the native clipboard code
just in case.
2018-05-24 12:56:07 -03:00
David Capello
7b49bf295f Add extra check in ListBox::selectChild() 2018-03-16 12:17:12 -03:00
yuxshao
afdb6d22db Stop mnemonic processing from truncating multibyte characters (#1661) 2018-02-22 11:50:03 -03:00
David Capello
dee6ff6c7e Refactor: Use new base::paths type for list of filenames/extensions 2018-02-21 11:06:58 -03:00
David Capello
d247e28e17 Make the first button as the default one
So Enter key just accept the message box and Esc cancels it.
2018-02-07 17:28:37 -03:00