Commit Graph

112 Commits

Author SHA1 Message Date
David Capello e7f0832ff3 Fix setting color space of all os::Windows 2021-05-21 21:44:30 -03:00
David Capello d2c6abf5a7 Fix saving/loading correct frame position (mainly on macOS)
We have to save the frame position before we close the native
window.
2021-05-10 11:52:38 -03:00
David Capello d6acb9e20f Save/load main window layout correctly and limit to current workarea
* Now the restored frame position/maximized flag are saved correctly.
* We've improved the default size to the current workarea of the main
  screen.
* Limit the initial frame position to the current available screens
  (e.g. the saved frame position could be invalid if the user
  unplugged a monitor)
2021-04-29 16:13:45 -03:00
David Capello 1f5b6980d3 Fix File > Open initial position when multiple monitors are used
With this patch we removed the ui::get_desktop_size() function
too (now we can get the workarea of the display's screen).
2021-04-21 17:01:43 -03:00
David Capello cf21f78d8d Limit loaded windows frame position with active workarea 2021-03-19 20:20:24 -03:00
David Capello bcd69495ce Fix several issues locating windows with multiple UI windows
We've refactored the code to support locating windows (and popups
windows + hot regions) correctly in both modes: with one ui::Display
and with multiple ui::Displays.

For this we've added a new ui::fit_bounds() function that works in
both modes.
2021-03-19 18:57:56 -03:00
David Capello 8034b0cbcc Add support for multiple native windows (#139, #250, #962, etc.)
Each ui::Window now can have a related native os::Window. This
connection is done through the ui::Display class added recently in
c3d52f0bbe.
2021-03-02 13:50:49 -03:00
David Capello 9dedb41e0f Fix compilation when ENABLE_DEVMODE is defined 2021-02-24 09:26:24 -03:00
David Capello c3d52f0bbe Add ui::Display to support multiple windows in the future
This ui::Display is related to one native os::Window, so the dirty
region/invalid region is now part of a ui::Display instead of a
ui::Manager.

* Replaced ui::display_w/h() functions with ui::Display::size()
  and ui::get_desktop_size()
* The ui::Manager contains the main ui::Display, and in the future an
  ui::Window will have its own ui::Display
2021-02-18 12:34:42 -03:00
David Capello 5d31314cdb Adapt code to the new os::Display -> os::Window refactor 2021-02-02 15:59:28 -03:00
David Capello d0b39ebade Redraw window immediately on "live resizing" 2021-01-12 21:39:12 -03:00
David Capello 91628daa9d Merge branch 'master' into beta 2020-12-22 15:48:15 -03:00
David Capello 81d9e8afec Fix bug with Console when the UI Screen Scaling is changed 2020-12-11 15:52:14 -03:00
David Capello 20d763ca4b Merge branch 'master' into beta 2020-07-30 16:48:43 -03:00
David Capello 8c0f81cbba Improve handling of image sequences when dropping files or opening multiple files
Now we can repeat the same action (Agree/Skip the all sequence of
images) for all the dropped files/selected files in the "Open File"
dialog (as in the CLI new behavior).
2020-07-30 16:27:23 -03:00
David Capello db4504e816 Refactor laf-os memory handling 2020-07-07 19:06:48 -03:00
David Capello c8999af6d6 [steam] Avoid crash taking screenshots after Steam client is closed 2020-06-11 14:51:28 -03:00
David Capello 86259a64fc Replace MID() macro with base::clamp() function
In the future we will replace base::clamp() with std::clamp().
2020-04-07 19:47:16 -03:00
David Capello 9461c5d02c Don't allow call Exit command (e.g. Cmd+Q on macOS) when there is a foreground window
The same for drop files, we've disabled dropping files when there is a
foreground window (at least temporarily to avoid strange UI states).
2019-10-29 10:31:12 -03:00
David Capello d32fd97da5 Replace base::SharedPtr with std::shared_ptr
We can remove our smart pointer (base::SharedPtr) as we're already
using C++11 compilers on all platforms.
2019-08-01 19:16:16 -03:00
David Capello 79795b97a9 Fix hang if we press Cmd-S two or more times quickly to launch File > Save
With this we avoid to unintentional execute two or more times a
command when we are already in a command execution.
2019-06-03 23:02:24 -03:00
David Capello 93fe19d353 Use cancelable async tasks to load/delete backup sessions 2019-05-30 23:17:13 -03:00
David Capello dd8a49a19c Add option to disable changing the display color profile depending on the current monitor 2019-05-08 10:55:56 -03:00
David Capello 2ffb708be8 Move Manager::invalidateDisplayRegion() to Manager::onInvalidateRegion() 2018-12-03 23:59:42 -03:00
David Capello 6bdde193f3 Don't limit the minimum windows size of the Preview window when we restore its bounds
Fixes https://community.aseprite.org/t/960
2018-11-29 11:44:10 -03:00
David Capello a38a23e2e5 Add support to drag-and-drop .aseprite-extension files into the main window 2018-11-28 10:30:33 -03:00
David Capello 5cb2d984f0 Rename she -> os 2018-08-09 12:58:43 -03:00
David Capello f2ed45e795 Replace base::UniquePtr -> std::unique_ptr 2018-08-08 17:27:26 -03:00
David Capello 413603a71a Don't use KeyboardShortcuts singleton for temporal changes in Keyboard Shortcuts dialog
Main changes:

- Improve the "Keyboard Shortcuts" dialog because instead of changing
  global shortcuts/menu keys and rollback everything if we select
  "Cancel", here we make a copy of all shortcuts, modify them in the
  dialog UI, and finally "commit" to the global shortcuts if the user
  confirms the dialog.
- Fix "Reset" button in "Keyboard Shortcuts" dialog for mouse wheel
  customization
2018-07-23 15:15:04 -03:00
David Capello f33091dbfa Add KeyPtr as std::shared_ptr<Key> 2018-07-17 23:53:08 -03:00
David Capello b3c89cd110 Rename DocumentView -> DocView 2018-07-14 23:24:49 -03:00
David Capello 9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -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 dee6ff6c7e Refactor: Use new base::paths type for list of filenames/extensions 2018-02-21 11:06:58 -03:00
David Capello e0a60b6748 Generate the list of command IDs from en.ini file 2017-12-01 15:10:21 -03:00
David Capello eb3143ce21 Rename CommandsModule to Commands 2017-11-30 12:24:07 -03:00
David Capello 0154a73d36 Add native macOS menus (fix #135)
* This implements the Cmd+H and Cmd+M keys too:
  https://community.aseprite.org/t/279
* Also Cmd+, has more priority on macOS than Cmd+K to open the
  preferences (so macOS menu shows Cmd+,)
2017-09-01 13:32:23 -03:00
David Capello 17df809011 Fix memory leaks/crash when reloading theme several times 2017-08-22 14:54:08 -03:00
David Capello c9f31bb07e Minor refactor in CustomizedGuiManager
Now Shift+F1 rotates screen/UI scaling in reverse order.
2017-08-16 15:17:11 -03:00
David Capello 4ed302e4b5 Add ENABLE_DEVMODE flag 2017-08-15 15:47:06 -03:00
David Capello 432eedcb97 Support changing theme and UI scaling w/o restart (fix #471) 2017-08-15 10:39:06 -03:00
David Capello 73999c5415 Fix several issues with UI Scaling > 100% (fix #1456) 2017-04-15 08:13:20 -03:00
David Capello bb4faca1d1 New Style class in "ui" layer to paint widgets (only button at this moment)
This new ui::Style should finally replace the old app::skin::SkinStyle
class. At this moment both implementations are working to avoid an
huge refactor in just one commit.

- Added new ui::Style property in ui::Widget.
- Removed old code to set the button "bevel" (removed
  app::setup_bevels() functions).
- Removed setup_look() function and Left/RightButtonLooks.
- Removed check_button_new() function.
- Removed ui::Theme::paintButton/ComboBoxButton() functions.
2017-02-13 18:34:23 -03:00
David Capello 6c9c0066a0 Replace ui::CurrentTheme with ui::set/get_theme() 2017-02-08 14:50:58 -03:00
David Capello 33d6ffb73b Avoid unused variable warning 2016-11-24 17:52:54 -03:00
David Capello 54da860a00 Minor change in CustomizedGuiManager::onProcessMessage() 2016-11-21 17:59:09 -03:00
David Capello 00099390da Fix several keyboard issues deadling with special characters/dead keys
This change adds support to write text with dead keys, and assign
keyboard shortcuts to special key combinations with Unicode characters
on macOS and Windows.

Fix #1083, close #796
2016-11-17 18:07:00 -03:00
David Capello 1b736aef85 Improve UX when opening file sequences
* Now we can select the specific files that are part of the sequence
* New checkbox do the same for all dropped files (fix #1284)
2016-11-15 18:11:47 -03:00
David Capello 2240742816 Avoid processing the same file two times when it's used to load a sequence
E.g. If we drop three files (1.png, 2.png, and 3.png), and we load 1.png
as a sequence, we don't want to ask for the third file.
2016-11-14 19:44:29 -03:00
David Capello 644b8ff0a4 Add Ctrl+Shift+R on debug mode to recover the active document from active backup session
In this way we can test on each moment how the information is being
saved and will be recovered. We can find bugs with missing or invalid
doc::Object::incrementVersion() calls.
2016-11-07 17:47:53 -03:00