92 Commits

Author SHA1 Message Date
David Capello
bc4f8ad3e1 Rename newStyles -> styles 2017-03-13 22:31:57 -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
7ab2d114b7 Don't use Unicode chars on status bar to show colors
This avoid loading an Unicode font to show just the alpha letter.
2017-03-09 12:04:16 -03:00
David Capello
f08757d9d2 Remove ui::Widget::textLength() member function 2017-02-21 10:48:25 -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
47f3d540b7 Fix drawing UI text with TrueType fonts (related to #124) 2017-02-06 17:58:55 -03:00
David Capello
a29503aef9 Fix assert() when using snap to grid without documents 2016-12-05 11:22:43 -03:00
David Capello
f4683f385d Minor change in GotoFrameEntry::onProcessMessage 2016-11-29 11:08:09 -03:00
David Capello
eacf28b65a Add option to change the first frame number on the Timeline (fix #1300) 2016-11-22 18:05:56 -03:00
David Capello
461d311dff Fix several buffer overflows using base::string_printf() 2016-11-22 11:54:15 -03:00
David Capello
69b52498a2 Add a visual icon when the program is saving backup data (fix #1114) 2016-11-07 16:32:54 -03:00
David Capello
6377b550e3 Replace base::Signal/Observable* with obs::signal/observable
We can use the obs library directly for signal/slots and observable
objects.
2016-09-13 15:02:00 -03:00
David Capello
5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello
1b715010bd Add tooltip to "new frame" button in status bar 2016-05-04 10:04:32 -03:00
David Capello
97d9b3cb31 Go to frame field in status bar isn't focused by default anymore (fix #1113) 2016-05-04 10:00:54 -03:00
David Capello
93c616cd7b Don't change two times the status bar text when the selected tool changes 2016-04-25 15:29:06 -03:00
David Capello
a09b00dba8 Fix synchronization of different UI elements depending on the active tool
With this patch now the context bar shows the real active tool
preferences. For example, if we choose the option to use the Eraser
tool with right-click, now right-clicking will draw with the Eraser
brush size (instead of using the selected tool/left-click tool brush
size).

Changes:
* Removed the toolBox.activeTool() field from preferences
  (as the option isn't persisted between sessions)
* Added an observable app::tools::ActiveToolManager class to sync all
  UI elements that depend on the active tool and ink.
* Moved a lot of "active tool" logic from app::Editor to the
  new ActiveToolManager
* Moved app::tools::ToolLoopManager::Pointer as an indepedent
  app::tools::Pointer class
2016-04-25 15:20:53 -03:00
David Capello
d363f29840 Fix timeout in StatusBar::showTool() 2016-04-25 13:26:39 -03:00
David Capello
7c2786164d Remove unused variable 2016-04-21 13:31:24 -03:00
David Capello
fcca96d6a3 Add missing text in StatusBar::showColor() 2016-04-19 15:43:12 -03:00
David Capello
87ef48b50b Improve status bar with icons/automatically generated and re-used parts (fix #752) 2016-04-19 13:45:23 -03:00
David Capello
0605166cc6 Move clock/tick from "she" to "base" library and switch to uint64_t type 2016-03-29 16:19:23 -03:00
David Capello
c09dfa89f0 Show grayscale colors in color buttons when we're editing a grayscale image 2016-02-24 19:37:20 -03:00
David Capello
455153d4b9 Change ui::TipWindow public API
Arrow align and target bounds are given as parameters of the new
TipWindow::pointAt() member function. Now TipWindow() contains a
default ctor.
2015-12-10 16:50:16 -03:00
David Capello
d467d71fa5 Rename PopupWindow enums 2015-12-05 15:56:32 -03:00
David Capello
e944ce0052 Move Bind, Connection, Signal, Slot, etc. to base namespace 2015-12-04 15:17:42 -03:00
David Capello
1aaeacc460 Refactor several "getNoun()" getters to "noun()"
This is a work-in-progress to create a consistent API and finally
separate the whole Aseprite base/gfx/ui libs into a reusable C++ library.

Classes:
app::IFileItem, app::AppMenuItem, app::skin::SkinPart,
gfx::Rect, gfx::Border, she::FileDialog,
ui::IButtonIcon, ui::Graphics, ui::Overlay, ui::Widget,
ui::ScrollableViewDelegate, and UI events
2015-12-04 14:39:04 -03:00
David Capello
cdd955441a Rename PreferredSize -> SizeHint 2015-12-03 21:50:05 -03:00
David Capello
4dc6da286e Add zoom slider in StatusBar (issue #420) 2015-08-14 19:46:48 -03:00
David Capello
fa53692221 Remove the cel opacity slider from the status bar
It added more noise to the screen for a feature that is uncommonly used.
2015-08-14 15:37:21 -03:00
David Capello
53a925e86d Remove SkinParts enum
Now we generate the list of SkinTheme parts from the skin.xml file using
the gen utility.

Several refactors included in SkinTheme class to simplify code.
2015-08-04 19:38:52 -03:00
David Capello
056e365cc3 Use a PopupWindow instead of a TipWindow for SnapToGridWindow 2015-07-28 14:55:40 -03:00
David Capello
a7ea0f7ec5 Add "Snap to Grid" indicator when it's enabled (fix #122) 2015-07-28 13:05:59 -03:00
David Capello
9e5ccbcca9 Remove StatusBar color names in status_bar.cpp 2015-07-28 12:25:15 -03:00
David Capello
be6779631b Modify eyedropper tool to pick colors with alpha and support several modes
Issue #286
2015-07-02 18:13:47 -03:00
David Capello
a2538628c7 Convert ui::Widget::border_width/child_spacing to private fields 2015-06-23 19:20:49 -03:00
David Capello
f01b816fb5 Remove JI_ prefix from ui/base.h constants 2015-06-23 14:00:00 -03:00
David Capello
5a97f4b129 Adjust StatusBar's opacity slider min size depending on window resizes 2015-06-10 17:17:27 -03:00
David Capello
23a4cb3a0b Fix some problems updating the StatusBar cel opacity slider
Now the StatusBar observes changes in the cel opacity to update the
slider (e.g. when we change the cel opacity through Cel > Properties
menu, the StatusBar refresh its slider).
2015-05-19 16:39:47 -03:00
David Capello
f6be0c3be6 Replace ISettings with Preferences
Changes:
* Move FreehandAlgorithm/InkType/RotationAlgorithm/SelectionMode to
  app::tools namespace
* Removed ISettings, IToolSettings, IBrushSettings, ISelectionSettings,
  and IColorSwatchesStore (and implementations from UISettingsImpl)
* Added app::tools::PreferenceGlue to do some adjustments that
  UIToolSettingsImpl was doing
* Remove signals from App related to brush size/angle changes, and current
  tool change (there events can be observed directly from Preferences)
* Remove ColorBar::FgColor/BgColor, these options can be observed from
  Preferences::colorBar.fg/bgColor
2015-05-18 16:53:25 -03:00
David Capello
cea0970d9d Fix several bugs with tooltip arrows/location
The tooltip arrow is now aligned to the target. And the tooltip is
relocated to the other side if it intersects its target bounds.
2015-05-09 13:20:57 -03:00
David Capello
a489efdf03 Use ContextObserver to update the StatusBar
Instead of calling StatusBar::updateUsingEditor(Editor*), now the StatusBar
is a ContextObserver that observe changes in the active doc::Site. The
Editor notifies a ActiveSiteChange event when the active frame/layer
is changed.

Fix #657
2015-05-05 13:24:26 -03:00
David Capello
53e25770b1 Status bar should not eat Enter key when it isn't focused (fix #660) 2015-05-05 09:47:05 -03:00
David Capello
aae3e69fda Fix bug showing frame # and opacity slider in StatusBar without an active document 2015-04-16 13:14:39 -03:00
David Capello
5a5a6fe4f6 Replace slider_change_hook() with StatusBar::onCelOpacityChange() 2015-04-16 13:07:14 -03:00
David Capello
4e1cebf966 Give some timeout to lock the sprite in certain operations 2015-04-15 09:59:36 -03:00
David Capello
8353e45ae8 Add tooltip for StatusBar::m_currentFrame 2015-04-10 11:23:21 -03:00
David Capello
669765c708 Fix StatusBar::onResize() layout when we don't have enough width 2015-04-10 11:21:37 -03:00
David Capello
1bed018ab0 Add timeout parameter to Context/Document lock/unlock operations 2015-04-10 11:10:42 -03:00
David Capello
45f4d30450 Remove unused variables/functions 2015-04-09 11:36:09 -03:00