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
David Capello
d4244fed48
Add options to avoid showing dialogs saving files ( #917 )
2018-02-07 17:28:01 -03:00
David Capello
9520dee00a
Avoid random crashes changing Color Mode with a TTF font in the theme
...
This is a weird combination of things:
1. StatusBar::onPixelFormatChanged() is being called in a non-UI thread
because ChangePixelFormatCommand changes the color mode from a
Job (background thread).
2. The UI layer is not prepared to work on multithreading, so all UI
stuff should be used in the main UI thread (anyway, generally, the UI
layer doesn't crash if it's used by multiple threads).
3. The harfbuzz library (used for TTF fonts) crashes if it is used by
multiple threads, so that was the trigger of this crash.
2017-12-13 17:11:53 -03:00
David Capello
2ccbf44a55
Fix crosshair glitches on Editor when brush size popup is open
2017-12-05 13:31:34 -03:00
David Capello
848ce5972d
win8: Add support to double tap with pen
...
Discussion:
https://community.aseprite.org/t/surface-pro-3-file-navigation/696
2017-11-23 17:03:24 -03:00
David Capello
f2a2510cea
Use a obs::safe_list() for ui::Timers to avoid data races between threads
2017-11-03 10:51:45 -03:00
David Capello
73605749e6
Improve Graphics::dirty() to avoid flipping unnecessary she::Display areas
2017-11-03 09:36:12 -03:00
David Capello
f07359d71c
Minor TODO item on Widget::setBoundsQuietly() for the future
2017-11-03 09:35:00 -03:00
David Capello
7becbc09b8
Update window title label size to show the entire text when it's changed
2017-10-26 21:59:19 -03:00
David Capello
d748cc7582
Add DEBUG_UI_THREADS to debug functions called from a non-main thread
2017-10-26 21:38:27 -03:00
David Capello
0ee5dbea7a
Improve keyboard shortcuts list with resizable headers
2017-10-24 10:20:21 -03:00
David Capello
a9b183729f
Translate all alerts to the en.ini file ( #124 )
2017-10-17 18:00:45 -03:00
David Capello
dede3610f3
Fix bug inserting the first char in a text entry
...
If a text field (ui::Entry) contains text with length=1 (e.g. the number
"8"), and we focus and press that same char ("8"), the caret will be in
the position 0 with text "8" (the caret should be in position 1). this
patch fix this behavior.
2017-10-03 14:45:53 -03:00
David Capello
c3bc7acb4d
Fix crash using a theme with an undefined <style>
...
Related to: https://community.aseprite.org/t/498
2017-09-28 15:27:27 -03:00
David Capello
7dc7bf09e2
Windows: fix last gray background when the main window is closed
2017-09-28 12:41:19 -03:00
David Capello
c5c964bfcd
Update Skia to chrome/m62 (our aseprite-m62 branch)
2017-09-19 13:41:28 -03:00
David Capello
7b7b12b593
Fix bug "Rewind on Stop" increments start frame randomly ( fix #1569 )
2017-09-08 11:20:55 -03:00
David Capello
f223d157fd
Fix crash dragging the mouse in the toolbar
...
If we pressed the mouse button in the toolbar and start moving the mouse
like crazy just to create/destroy the toolbar popup multiple times, it
reached a situation where the Manager's mouse_widget was equal to a
deleted widget (and mouse_widgets_list contained that widget too),
producing a crash when we tried to access it.
2017-09-04 18:10:02 -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
a9c1b26db3
Fix reposition of windows when Screen/UI scaling is changed
2017-08-17 09:16:11 -03:00
David Capello
2bee243c39
Replace INT_MAX with std::numeric_limits<int>::max()
2017-08-15 11:25:23 -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
14ba0ab411
Add addition/subtract/divide blending modes
...
Changes:
* Added SeparatorInView() to add separators inside a ListBox or ComboBox.
* Added BlendModeItem() to represent each item in the blending modes
ComboBox.
* Now a ComboBox can contain any kind of widgets as children (not just
ListItem). This is required to add separators in the blending modes
ComboBox.
Feature request:
https://community.aseprite.org/t/additive-blending-feature/121
2017-07-24 15:25:13 -03:00
David Capello
147f36077b
Timeline: Redraw only marching ants on timer tick ( fix #1537 )
2017-07-18 17:07:35 -03:00
David Capello
76df15d3c3
Add mnemonics to Extensions section in Preferences
...
Also fixed a problem using Alt+mnemonic on hidden buttons.
2017-06-13 12:04:40 -03:00
David Capello
a9e688989f
Implement Add/Uninstall extension ( #1403 )
...
- Added libarchive to uncompress .zip extensions
- Moved ListItem painting code to styles because we needed a selected+disabled state.
2017-06-12 12:38:53 -03:00
David Capello
d5c47e2213
Make Entry fields bigger in ContextBar to avoid text scrolling
2017-05-31 16:21:34 -03:00
David Capello
f4fc77e050
Add search field on palette popup
2017-05-30 15:46:54 -03:00
David Capello
523b6a0a51
Show a DitheringSelector item in the combobox when it's closed
...
In this way we can show listbox/custom items in the combobox when we
select an item instead of showing text-only (the ui::Entry).
2017-05-23 13:41:11 -03:00
David Capello
bcdf598392
Add widget to choose dithering algorithm + matrix
2017-05-22 15:44:08 -03:00
David Capello
7bc593ac34
Change Entry::maxSize property from size_t to int
2017-04-19 17:51:03 -03:00
David Capello
73999c5415
Fix several issues with UI Scaling > 100% ( fix #1456 )
2017-04-15 08:13:20 -03:00
David Capello
2aeae2aaa7
Add messages for X1/X2 mouse buttons
...
Related to #598
2017-04-13 17:58:42 -03:00
David Capello
e5c15161e8
Add a new mouse cursor to move selection edges
...
With this change the app-specific cursors were removed from the ui library. Maybe it needs some clean-up for following versions.
2017-04-06 18:41:18 -03:00
David Capello
043489e532
Color frame tag lines (related to #920 )
2017-03-27 12:32:39 -03:00
David Capello
37748c3783
Add automatic cel guides when Ctrl/Cmd is pressed
2017-03-23 00:57:21 -03:00
David Capello
60970b8eae
Remove unused code from ui::Button
...
Removed IButtonIcon interface and Button::m_drawType field.
2017-03-17 16:13:47 -03:00
David Capello
bc01f16a4e
Move painting code for checkbox & radio button to theme styles
2017-03-17 15:43:42 -03:00
David Capello
b6cf0f218c
Add search field on Font Popup
...
Added support to set child visibility property to ListBox items.
2017-03-15 14:24:42 -03:00
David Capello
be3c9c1bcc
Convert timeline widget to new styles
...
And remove the old skin::Style.
2017-03-13 18:13:38 -03:00
David Capello
ca2aae6349
Convert tabs painting code to new styles
2017-03-13 13:47:37 -03:00
David Capello
aabdb11779
Change scrollbar to new theme styles
2017-03-10 22:42:15 -03:00
David Capello
36ee5a39c8
Convert news items to new theme styles
2017-03-10 19:23:43 -03:00
David Capello
4b60806556
Fix mouse over state over recent file item & news item at the same time
2017-03-10 18:51:20 -03:00
David Capello
62db0c73a3
Fix clicking on a user data popup widgets
...
The textbox used in the tooltip was getting all clicks from the user. So on the user data popup we have to 1) don't set the title bar text, 2) if the title bar is not set the text box is hidden so will not eat all click messages.
2017-03-09 16:15:39 -03:00
David Capello
e2a94b094a
Fix bug drawing box/grids bgcolor on tooltip windows
2017-03-09 15:12:39 -03:00
David Capello
81bcc07457
Fix canvas size button set item borders
...
We must not activate HAS_TEXT flag on widgets without text on XML files processing the mnemonic character.
2017-03-09 12:00:32 -03:00
David Capello
94dcfa7f35
Fix ColorButton font
...
- We've added a new "font" attribute in <style>s elements.
- Fonts aren't reset when we refresh the theme. This must be fixed in a future version when the theme can be completely reloaded.
2017-03-08 18:53:36 -03:00
David Capello
482f3eed0e
Fix crashes editing composed unicode strings
2017-03-08 13:54:21 -03:00
David Capello
e4577665c3
Remove unused variable
2017-03-07 11:06:58 -03:00
David Capello
46974e3345
Fix compilation on Windows
2017-03-07 09:24:35 -03:00
David Capello
5d7b62e652
Fix ui::Entry to handle composed Unicode chars correctly
2017-02-21 18:05:23 -03:00
David Capello
f08757d9d2
Remove ui::Widget::textLength() member function
2017-02-21 10:48:25 -03:00
David Capello
24faae2ca5
Use HarfBuzz to render combining characters correctly
2017-02-20 17:14:41 -03:00
David Capello
921c5c8ad1
Move ui::Separator drawing code to new styles
2017-02-17 18:23:21 -03:00
David Capello
86f138a714
Move ui::Splitter painting code to new styles
2017-02-17 16:17:00 -03:00
David Capello
cc20f0a21e
Remove Theme::paintDesktop()
2017-02-17 14:37:58 -03:00
David Capello
a62f12ad09
Move all code to draw windows to ui-lib w/new styles
2017-02-17 14:18:47 -03:00
David Capello
235011e169
Add "const" to several Theme and Widget function members
2017-02-15 16:44:50 -03:00
David Capello
7cb41729ab
Convert label and view into new styles
...
In this way the WidgetLoader looks for new styles only.
2017-02-14 14:55:45 -03:00
David Capello
17151cddcd
Move mnemonic key as a property of ui::Widget
...
In this was we can process the text string just one time to remove the
character preceded by '&' that will be finally acts as a mnemonic. This
simplifies the rendering and text measure code too.
2017-02-14 14:16:37 -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
f7903a74de
Add ui::Theme::drawSlices() member function
2017-02-09 17:01:43 -03:00
David Capello
7e6fc5a815
Move drawTextBox() function inside Theme class
2017-02-08 15:00:07 -03:00
David Capello
6c9c0066a0
Replace ui::CurrentTheme with ui::set/get_theme()
2017-02-08 14:50:58 -03:00
David Capello
9016d8635b
Fix problems on ui::Entry() with TrueType fonts
...
Fixed several problems drawing and selecting text with TrueType fonts.
2017-02-07 19:05:47 -03:00
David Capello
47f3d540b7
Fix drawing UI text with TrueType fonts (related to #124 )
2017-02-06 17:58:55 -03:00
David Capello
79f82cfbee
Merge branch 'beta' into master
...
The next official release will be v1.2.
2017-01-30 16:02:21 -03:00
David Capello
d9ae6812d5
Update ui lib copyright
2017-01-09 12:50:28 -03:00
David Capello
8fa5d2dff1
Remove the "new_windows" var from ui::Manager impl
...
Fix regression bug introduced in
66e9cee3e6
where new opened windows
weren't painted.
2017-01-09 12:45:03 -03:00
David Capello
042b427f49
Merge branch 'master' into beta
2017-01-06 18:02:24 -03:00
David Capello
66e9cee3e6
Fix crash on UI tests
...
Generating paint messages without a she::System available.
2017-01-06 16:55:21 -03:00
David Capello
4ac63503c0
Minor change in ui/accelerator.cpp
2017-01-06 14:19:06 -03:00
David Capello
eb0f046dc7
Fix general UI delay/flickers redrawing elements
...
This is an old bug that makes the UI looks as "partially painted." We
have to process all logic messages first, and then generate paint
messages so we paint the latest UI state (instead of a intermediate
UI state).
2017-01-02 15:38:20 -03:00
David Capello
3d43b96517
Merge branch 'master' into beta
2016-12-29 11:24:20 -03:00
David Capello
ea71455f81
Fix ZoomEntry slider range
...
After f8874f4f7b
, we fixed the zoom text
entry but we broke the zoom slider. We weren't able to select zoom
factors with the slider correctly (as the scale from 0 to 6400 was too
big). Now we revert the change and make the maximum text length in entry
bigger so the user can enter zoom levels like 6400 in the text entry and
use the zoom slider.
2016-12-29 10:22:39 -03:00
David Capello
0014673e41
Merge branch 'master' into beta
2016-12-22 10:46:37 -03:00
David Capello
809a90ba3b
Fix crash using focus-movement keys in strange UI state
...
There were some crash reports in these days on the focus movement
code. It looks like we could arrive into an invalid/strange UI state
double-clicking palette buttons and showing menus two consecutive
times. After that, pressing Tab key would crash the focus-movement
logic.
2016-12-20 16:59:07 -03:00
David Capello
f8874f4f7b
Fix zoom entry so we can insert numbers with 4 digits
2016-12-16 14:53:26 -03:00
David Capello
dc19c4b589
Merge branch 'master' into beta
2016-12-07 12:14:28 -03:00
David Capello
315584d819
Close toolbar popup when the document is closed
2016-12-07 11:12:19 -03:00
David Capello
fec4e27d8e
Fix widget border in drawTextBox()
2016-12-06 21:29:14 -03:00
David Capello
c1e428544e
Add minimal .md browser to show README/LICENSES files
...
Now we can see markdown files inside Aseprite. This is an initial
support (text only, separators, links only on headers and to external
URLs).
- Added a new docs/LICENSES.md file
- Removed old .txt licenses
2016-12-06 16:03:51 -03:00
David Capello
396f5fb78f
Merge branch 'master' into beta
2016-12-02 19:13:08 -03:00
David Capello
42b8d04e46
Fix crash clicking on a non-ListItem widget inside a multiselect ListBox
2016-12-02 18:41:09 -03:00
David Capello
a46a087c51
Handle arrow keys/delete/backspace/etc. correctly on IntEntry ( fix #1339 )
2016-12-02 16:47:05 -03:00
David Capello
812e75f613
Replace "pin" icon with the regular "close" button
...
I was contacted several times by people that cannot close these pinned
popups window. The best solution is to do the same that a regular
window: show the close button.
2016-12-01 15:15:16 -03:00
David Capello
f57c298ad6
Merge branch 'master' into beta
2016-11-29 12:15:25 -03:00
David Capello
acdd9c3fed
Don't add dead chars if the entry field is full
2016-11-29 11:08:29 -03:00
David Capello
60d89b10ed
Fix crash introduced in 701170d85e
2016-11-24 19:59:34 -03:00
David Capello
74248cf33c
Cmd+mnemonic on macOS now can press a button
2016-11-24 19:26:52 -03:00
David Capello
701170d85e
Fix alt+mnemonic on macOS
2016-11-24 19:26:21 -03:00
David Capello
0d169fed75
Improve ui::drawTextBox() performance
2016-11-22 13:33:01 -03:00
David Capello
0ed0ad287c
Fix TextBox drawing when we scroll it
2016-11-22 12:47:46 -03:00
David Capello
5828df1383
Add smooth scroll to ui::TextBox
2016-11-22 12:46:42 -03:00
David Capello
d5d71257fe
Remove comment from TextBox::onSizeHint()
2016-11-22 12:46:23 -03:00
David Capello
461d311dff
Fix several buffer overflows using base::string_printf()
2016-11-22 11:54:15 -03:00
David Capello
096b26fea6
Fix Space keyboard modifier to scroll the Editor
2016-11-22 10:51:03 -03:00
David Capello
a67589aa05
Fix Ctrl+A/C/V/X on RGB/HSV text fields
2016-11-22 10:34:00 -03:00
David Capello
b6076e6732
Fix "magnet enter" when we are in a ui::Entry
...
Pressing Enter on a ui::Entry will press "OK" buttons.
2016-11-21 12:28:42 -03:00
David Capello
d444f5b78e
Minor change in Manager::processFocusMovementMessage
2016-11-21 10:37:54 -03:00
David Capello
3f1f07807b
Add support to cycle RGB/HSV text fields with tab key ( fix #1019 )
...
Added a new flag in messages to know if they came from a filter or from
the original chain of recipients. To do this, we've added a new way to
process message filters: instead of pre-adding filters to the list of
message recipients, we process filters in the Manager::pumpQueue()
member function itself. (So the list of "recipients" is not modified.)
2016-11-19 00:57:58 -03:00
David Capello
f054aaa2cc
Minor changes in ui::Slider
2016-11-19 00:23:54 -03:00
David Capello
d8bc90696e
Rename Manager::isFocusMovementKey -> isFocusMovementMessage
2016-11-18 14:26:00 -03:00
David Capello
0703bf159c
Add ui::Manager::processFocusMovementMessage() function
2016-11-18 14:22:14 -03:00
David Capello
6746049e60
Fix 1...6 keys to go to a specific frame on Windows
...
These keys where captured by the zoom command (gui Manager) first.
This regression was introduced in 00099390da
2016-11-18 13:47:02 -03:00
David Capello
02b9a953ef
Avoid creating a System instance in she::instance()
...
This is necessary for tests that don't need a System but call the
instance() function anyway.
2016-11-18 12:13:10 -03:00
David Capello
5dc8f9c8a0
Move keyboard functions to she::System
2016-11-18 11:15:02 -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
7f17400178
Minor changes in ui::Alert to simplify its code
2016-11-15 18:06:27 -03:00
David Capello
64af97131d
Support smooth scroll in ListBox
2016-11-15 17:31:56 -03:00
David Capello
2216db2d2c
Send mouse events when a new window is displayed ( fix #1221 )
...
In this way if a new widget is displayed it will get the mouse-enter and
set-cursor messages correctly.
2016-11-14 17:23:09 -03:00
David Capello
88455ebc4b
Fix compilation warnings when REPORT_EVENTS is defined
2016-11-14 17:21:37 -03:00
David Capello
4c2a283bd7
Double-click on a preset palette loads it
2016-11-14 15:55:21 -03:00
David Capello
b95326435c
Remove an always-true if statement
2016-11-14 15:53:36 -03:00
David Capello
5c3f75c64b
Merge branch 'master' into beta
2016-11-07 18:17:42 -03:00
David Capello
ce6c85996e
Update laf library (base/path is gone, use base/fs)
2016-11-01 19:14:05 -03:00
David Capello
54e60f058f
Merge branch 'master' into beta
2016-11-01 14:09:02 -03:00
David Capello
c2103df444
Move base module to laf library
2016-11-01 12:47:48 -03:00
David Capello
c60e0b915c
Merge branch 'master' into beta
2016-10-27 13:00:57 -03:00