Commit Graph

4118 Commits

Author SHA1 Message Date
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
3cd7d273d9 Update she/CMakeLists.txt for Skia branch 'chrome/m50' 2016-03-29 14:36:03 -03:00
David Capello
554885b83e Avoid warning about multiline comment on gcc 2016-03-29 12:53:16 -03:00
Azamat H. Hackimov
7964f1feb1 Make building tests optional
Added new option ENABLE_TESTS in CMake (ON by default)
2016-03-29 15:06:59 +05:00
David Capello
64449ffba8 Avoid signed/unsigned comparison in gcc/debug compilation 2016-03-28 18:59:35 -03:00
David Capello
27b55030e2 Fix bug pressing warning icon to add palette color when active locale is non-English
It looks like Allegro library was changing the locale to the active
one, and it can break things like strtod() (which is used to convert
colors from string format in AddColor command). In this case, if we added
a HSV color with double floating-point precision, it was added incorrectly
because strtod() wasn't taking the decimal part.
2016-03-28 15:30:00 -03:00
David Capello
f2ba51f1be Fix double-click in Allegro back-end when she_mouse_callback() is used 2016-03-28 10:36:06 -03:00
David Capello
799803d582 Add DrawingState::destroyLoopIfCanceled() to avoid duplicated code 2016-03-26 10:56:20 -03:00
David Capello
fde573d8db Merge branch 'master' of https://github.com/HunterNN/aseprite into HunterNN-master 2016-03-26 10:49:36 -03:00
David Capello
cf6be7349b Revert 6a63dc5aad as app already depends on net-lib 2016-03-26 10:17:12 -03:00
Azamat H. Hackimov
1a682f82eb Replaced LIBCURL_* to CURL_* in CMakeList
According to find_package() variables.
2016-03-26 16:01:45 +05:00
Azamat H. Hackimov
6a63dc5aad Adding ${CURL_LIBRARIES} to application linking
Fixing compilation underlinking with system curl.
2016-03-26 15:22:57 +05:00
Azamat H. Hackimov
3e9de78fa2 Using FOO_LIBRARIES and FOO_HEADERS from system cmake.
Fixes issue #864 (FREETYPE_INCLUDE_DIRS has not been added to search path)
2016-03-26 15:17:12 +05:00
Hunter99
edb2f971e5 Added cancel drawing loop on key release (fix #1002) 2016-03-25 14:32:36 +01:00
David Capello
7934c975ca Fix bug painting selection edges when zoom < 100% (fix #905) 2016-03-24 18:24:32 -03:00
David Capello
f696d895b4 Do not remap indexes between palette entries that are equal (fix #914) 2016-03-24 17:37:04 -03:00
David Capello
b4ce12beb4 Simplify hidden brush preview style 2016-03-24 14:51:57 -03:00
David Capello
8b161dac0a Add ShowBrushPreview command so the user can hide the brush preview with a keyboard shortcut (fix #792) 2016-03-24 14:45:28 -03:00
David Capello
9face9458e Add an option to change the "brush preview" style (related to #792) 2016-03-24 14:29:15 -03:00
David Capello
2af47fe907 Add option to toggle the selection edges visibility (fix #861) 2016-03-24 13:04:35 -03:00
Gabriel Rauter
34c1af0a1b New cmdl parameters --range and --shrink-to
--frame-range <from:to> lets the user define a range from frame to frame
instead of a frame tag. example --frame-range "0:1" exports 2 frame. frame 0
and frame 1.

--shrink-to <widthxheight> shrinks the sprite into the boundarys of
width and height keeping the original aspect ratio.
2016-03-23 22:32:21 +01:00
David Capello
d4faf04946 Add a rgba_blender_normal() version without opacity
This can be used to speed up text rendering and rotation algorithm.
2016-03-22 18:40:47 -03:00
David Capello
ce02a31c01 Improve image_scale_tpl() performance using an iterator for source image 2016-03-22 18:23:03 -03:00
David Capello
14262c270c Fix crash on image_scale_tpl() and rotsprite_image() 2016-03-22 17:05:45 -03:00
David Capello
66e3cacbd0 Add RotSprite as a resize algorithm on Sprite > Resize Sprite menu 2016-03-22 17:02:41 -03:00
David Capello
7841ec82f3 Flip mask when the whole canvas is flipped (fix #561) 2016-03-21 14:51:43 -03:00
David Capello
f51de0bd73 Merge pull request #1000 from sirblackheart/native-gtk3-file-dialog
Experimental native gtk3 file dialog
2016-03-19 12:24:43 -03:00
David Capello
417e431a32 Add different selection modes to SelectTile command
Now we can add a tile using Shift+double click or substract one with
Shift+Alt+double click.
2016-03-19 12:09:03 -03:00
David Capello
e62f80842c Avoid enter to tool loop after we select the tile 2016-03-19 12:04:39 -03:00
David Capello
30f4e995a3 Select a tile by double clicking over it (fix #939) 2016-03-19 11:33:05 -03:00
David Capello
497cfa61a4 Implement app::IColorSource in color selectors 2016-03-18 23:35:23 -03:00
David Capello
07b67a66f7 Add app::IColorSource interface to get pixels from widgets from mouse pos
This is consumed by ColorButton which can be dragged to use a eyedropper
in different widgets.
2016-03-17 17:16:35 -03:00
David Capello
2d3ee0c802 Rotate foreground color hue by default with mouse wheel above ColorSelector 2016-03-17 16:42:50 -03:00
David Capello
99803c07ba Add mouse wheel behavior in color selector to rotate hue (fix #1012) 2016-03-17 16:40:34 -03:00
David Capello
449ae1d9e4 Add new app::ColorSelector to share behavior between ColorTintShadeTone/ColorSpectrum/ColorWheel 2016-03-17 16:37:31 -03:00
David Capello
1209037b02 Rename app::ColorSelector -> app::ColorPopup 2016-03-17 16:08:08 -03:00
David Capello
6d3c09d088 Use bearingX adjustment to render FreeType glyphs correctly 2016-03-17 11:11:08 -03:00
David Capello
f626837cb5 New command to add foreground/background color in the palette 2016-03-17 10:47:50 -03:00
David Capello
fdde32b808 Don't use UI to warn about sequences when --batch and --save-as are used
Fix #1018 introduced in 978145ba7a
2016-03-17 10:31:33 -03:00
David Capello
8304b7511d Fix FreeType2 font rendering and font height calculation
We need to catch the glyph's bearingY value to render each glyph
correctly.
2016-03-15 18:43:36 -03:00
David Capello
e0135d6f57 Add fixes for gcc/clang in ft::FaceFT 2016-03-15 17:45:55 -03:00
David Capello
fb10cf1d36 Simplify code in generic_surface.h for gcc/clang 2016-03-15 16:34:41 -03:00
David Capello
9784c0d455 Minor change to fix gcc/clang compilation errors 2016-03-15 16:33:11 -03:00
David Capello
2fd94ed884 Simplify ft::Face API
Changes:
* Added ft::FaceBase to create a future Face impl with HarfBuzz as text
  shaping engine
* Define ft::FaceBase::Glyph as the parameter given to the forEachGlyph
  parameter
* forEachGlyph and calcTextBounds
* Remove operator FT_Face (we can use FaceBase::isValid() to know if the
  face isn't null)
2016-03-15 15:15:37 -03:00
David Capello
6f0819fa30 Fix crash in GenericDrawTextSurface::drawChar() when a TTF is used with Unicode text 2016-03-15 15:10:56 -03:00
David Capello
cb4b4f8b4d Minor change don't use drawUIString() in FileList::onPaint() 2016-03-15 12:56:44 -03:00
Gabriel Rauter
90b1c243b0 Revert make use of aseprite thumbnail-generator"
Revert to basic native behavior.

This reverts commit b64ba236d3.
2016-03-15 14:32:05 +01:00
David Capello
8de92df6cc Minor fix to show text caret on ui::Entry when it's at the end 2016-03-14 16:52:44 -03:00
David Capello
eec2d64f57 Replace FreeTypeFont::height() impl 2016-03-14 12:40:28 -03:00
David Capello
69a1161f69 Fix Entry bugs handling the text caret
Added more checks and improve performance in Entry::setCaretPos()
2016-03-14 12:39:45 -03:00
David Capello
29f6db6f35 Widget::textLength() returns the number of (Unicode) characters in the text field 2016-03-14 12:38:11 -03:00
David Capello
fb6a1481f9 Select Unicode charmap 2016-03-14 12:09:59 -03:00
David Capello
dbf5d69219 Add a simple cache system for glyphs 2016-03-14 12:09:45 -03:00
David Capello
3b2ce80e37 Fix compilation error in generic_surface.h with gcc and clang 2016-03-14 12:06:50 -03:00
David Capello
c0f402b945 Add she::Font::setAntialias() member function 2016-03-11 15:41:06 -03:00
David Capello
d020a19bd2 Add a simple cache mechanism to ft::Face (at the moment without cache) 2016-03-10 17:10:17 -03:00
David Capello
dfa6bcd16b Add a basic TrueType font impl to she library using FreeType library 2016-03-10 15:49:13 -03:00
David Capello
d33a2adb64 Add ft library (a freetype wrapper) 2016-03-10 11:21:03 -03:00
David Capello
0abe01c5f4 Merge she::LockedSurface/NonDisposableSurface with she::Surface 2016-03-09 11:00:17 -03:00
David Capello
d49d37302c Rename she::System::loadBitmapFont -> loadSpriteSheetFont 2016-03-07 17:48:35 -03:00
David Capello
97f1d0f895 Rename she::CommonFont to SpriteSheetFont 2016-03-07 17:39:02 -03:00
Gabriel Rauter
b64ba236d3 she/gtk: make use of aseprite thumbnail-generator
use the aseprite thumbnail generator for file preview
2016-03-07 18:59:15 +01:00
Gabriel Rauter
29eaaea1fd she/gtk: add a simple image preview
This adds a simple image preview for image formats supported by
Gdk::Pixbuf.
2016-03-07 15:46:08 +01:00
David Capello
f391be6824 Cache name and path in RecentFileItem
This is to avoid calling base.:get_file_name/path()
on each onPaint/SizeHint()
2016-03-04 17:30:12 -03:00
Gabriel Rauter
745fd180d4 Experimental native gtk3 file dialog
This pull request basicly adds the suport for gtk3 dialogs to she.
it is disabled by default and can be enabled with
cmake ... -DWITH_GTK_FILE_DIALOG_SUPPORT=ON ..
and needs the Experimental option "Use native file dialog"
enabled in aseprite enabled.
It is currently only available on *nix and has a external
dependencie on gtkmm >= 3.16 and glibmm >= 2.45

To have at least backwardcompatibility with ubuntu 15.10
the cmake option -D_WITH_DEPRECATED_GLIB_SUPPORT was added
to make use of a deprecated glibmm method.

Further testing ist need to see how far this backward
compatibility works, as of now ubuntu 12.04 does not seem to work.
But as ubuntu 12.04 will reach its end of support this summer and
ubuntu 15.04 having passed its end of life in february the question
is how far back this support is aimed for. Please enter the commit message for your changes. Lines starting
2016-03-04 21:22:44 +01:00
David Capello
75203037e2 Merge branch 'master' 2016-03-04 15:44:04 -03:00
David Capello
962928a609 Add the possibility to assign a keyboard shortcut to color quantization (#999) 2016-03-04 15:41:32 -03:00
Etienne Faisant
c7968d4f2d Update fstream_path.h
Fix build on Windows with MinGW
2016-03-04 15:03:46 +01:00
David Capello
451bf02b82 Remove unused variable from replace_image_colors() 2016-03-03 23:41:46 -03:00
David Capello
1ee3efd91d doc/image_buffer.h needs uint8_t definition 2016-03-03 23:25:49 -03:00
David Capello
51f58fda5f base/24bits.h needs uint8_t definition 2016-03-03 22:43:10 -03:00
David Capello
0a5e108ce1 Include base/ints.h in median_filter.h because it's needed for uint8_t 2016-03-03 22:30:13 -03:00
David Capello
368f64d5dc Include base/ints.h from convolution_matrix_filter.h 2016-03-03 21:22:17 -03:00
David Capello
093c5e1e0e Fix base/buffer.h so we include base/ints.h to define uint8_t 2016-03-03 20:33:53 -03:00
David Capello
d33b8f7064 Set default path (MODP_B64_DIR) to find modp_b64 from base library 2016-03-03 19:28:29 -03:00
David Capello
9784721a67 she/system.h needs gfx::Size 2016-03-03 19:27:43 -03:00
David Capello
a14a81a2c0 Undefine ERROR macro in base/log.h if it's defined 2016-03-03 19:27:09 -03:00
David Capello
260f597cc4 Define PACKAGE/VERSION/UPDATE_URL if they are undefined 2016-03-03 19:26:46 -03:00
David Capello
285deb603e Define _CRT_SECURE_NO_WARNINGS on sub-libraries that need it 2016-03-03 19:22:52 -03:00
David Capello
7b06b74715 Include base/log.h on files that use LOG() macro 2016-03-03 19:21:53 -03:00
David Capello
8c9d9eb84c Replace NULL with nullptr on files that don't include base/base.h 2016-03-03 19:20:57 -03:00
David Capello
9a7ffab5a0 Move stdints to base/ints.h file 2016-03-03 19:20:00 -03:00
David Capello
5f97e66a8b Include base/base.h on files that use MIN/MID/MAX 2016-03-03 19:18:46 -03:00
David Capello
4f6a7a7742 Include base/debug.h on files that use ASSERT or TRACE 2016-03-03 19:17:07 -03:00
David Capello
645486f435 Add tooltip to "Super" key checkbox in shortcut dialog 2016-03-02 12:33:05 -03:00
David Capello
cb86fb4c8f Rename ui::winKeyName to ui::kWinKeyName 2016-03-02 10:31:39 -03:00
David Capello
321eb36f52 Fix getting lwin/rwin key state on Windows 2016-03-02 10:07:45 -03:00
Gabriel Rauter
cb92b781eb Change Windows Modifier Name to Win for Windows and Super for Linux/BSD 2016-03-01 23:52:36 +01:00
Gabriel Rauter
e22332144a Add Windows Key as possible Modifier in Keyboard Shortcuts on Windows and Linux as a step to fix #796 2016-03-01 20:14:32 +01:00
David Capello
e887328624 Fix check to know if dl library was found 2016-03-01 14:52:41 -03:00
David Capello
a22039cd16 Check dl library existence (fix #990)
As FreeBSD includes dl functions in libc, dl library doesn't exist.
(dlfcn.h header file must exist anyway.)
2016-03-01 09:16:19 -03:00
David Capello
1d7184dd37 Fix problem setting default screen scaling factor on non-Windows platforms 2016-02-29 22:21:59 -03:00
David Capello
78da4a40a1 Avoid warning on Graphics::drawUIString() 2016-02-29 22:21:21 -03:00
David Capello
91b8df9d4d Fix mouse lag on Linux (fix #957)
As now we can generate several mouse events in
one generateMessagesFromSheEvents(), thanks to
1588e834c3, we can process
all mouse events from Allegro 4.
2016-02-29 22:21:07 -03:00
David Capello
5798c896e2 Don't generate a kSetCursorMessage when the mouse is outside the window
Should finally fix #948
2016-02-29 22:18:36 -03:00
David Capello
fb4fc576bc Fix clicks on X11 (fix #971) 2016-02-29 22:13:23 -03:00
David Capello
2bbd918d99 Update version to 1.1.3-dev 2016-02-29 22:11:00 -03:00
David Capello
5bb46e82cf Add more info about new libraries in src/ directory 2016-02-29 12:25:35 -03:00
David Capello
733ca44b64 Fix dummy PenAPI::Impl ctor 2016-02-29 09:27:38 -03:00
David Capello
d58773756e Add minimal Wacom support
This should fix the lag on Windows platform when we click with the pen.
2016-02-29 08:32:10 -03:00
David Capello
51c939b210 Find the Steam DLL in the app directory 2016-02-26 20:19:37 -03:00
David Capello
1c8d89c31f Merge pull request #973 from farnold/master
OS X: fix clang compile error over non-existent simpleini lib
2016-02-26 19:00:25 -03:00
David Capello
1512e7af52 Merge pull request #979 from sirblackheart/fix-missing-overrides
Fix missing overrides as shown by warnings mentioned in issue #955
2016-02-26 18:58:04 -03:00
David Capello
5fbb4e90d7 Create log in Desktop folder when --debug is used 2016-02-26 17:08:42 -03:00
David Capello
b5d04525c0 Use fstream::is_open() instead of operator bool() 2016-02-26 16:51:30 -03:00
David Capello
516ee5c611 New LOG() function with different logging levels and std::ostream support 2016-02-26 16:13:54 -03:00
David Capello
873ca55c10 Merge branch 'tint-shade-tone-selector' 2016-02-26 15:13:28 -03:00
David Capello
c8d59df66e Save separation distance/layout of internal ColorBar splitter 2016-02-26 15:09:40 -03:00
David Capello
ca160d0647 Remove unnecessary iterations on splitter children in onSave/LoadLayout 2016-02-26 15:08:58 -03:00
David Capello
875e2cd391 Fix possible bug/crash using a cmd::CopyRegion()
The region that we save must be exactly the same that we use in the swap
process.
2016-02-26 12:50:09 -03:00
Gabriel Rauter
7d80b16854 fix missing overrides as shown by warnings mentioned in issue #955 2016-02-26 15:37:41 +01:00
David Capello
7a0a89e59e Add the new ColorTintShadeTone color picker (#707) 2016-02-26 11:18:46 -03:00
David Capello
4e4f473dd6 Don't limit the selection of colors in the spectrum area
In this way when we capture the mouse, we can move it outside the
widget and we're still picking colors in the border of the spectrum.
(Which is useful to select pure black or white.)
2016-02-26 11:13:19 -03:00
David Capello
c1a2cbebde Remove "typename" keyword in replace_image_colors() 2016-02-26 10:09:45 -03:00
David Capello
2da643ef56 Fix warning in doc::write_string() 2016-02-26 10:09:03 -03:00
David Capello
d78f892236 Add more zoom levels 2016-02-25 18:51:13 -03:00
David Capello
5c61e92193 Change custom brush color when we change fg/bg colors 2016-02-25 18:48:59 -03:00
David Capello
d10dd157e7 Don't use custom clipboard format on Windows if we couldn't register it 2016-02-25 18:47:37 -03:00
David Capello
69e7623628 Fix shading ink for grayscale images 2016-02-24 19:48:46 -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
155c74a633 Fix usage of indexed colors in grayscale images 2016-02-24 18:22:51 -03:00
David Capello
0cf39625f8 Minor fix in PaletteView::setBoxSize() to apply the guiscale() to the box size 2016-02-24 17:37:36 -03:00
David Capello
ad98fab506 Link filters-lib with base-lib to avoid linking errors on Linux 2016-02-24 13:22:15 -03:00
David Capello
5dd2d8119b Add initial support to Steam API (just inform to Steam that we're running) 2016-02-24 13:21:37 -03:00
David Capello
d2f1e2b6d2 Add functions to load dynamic libraries from base-lib 2016-02-24 13:11:40 -03:00
David Capello
30672ba144 Don't reset Screen Scale when the main window cannot be created
Should fix #860
2016-02-23 18:08:25 -03:00
David Capello
55f60be79a Fix crash creating a custom brush without "Type" option and restarting 2016-02-23 18:06:19 -03:00
David Capello
12ec08f97f Update copyright year 2016-02-23 16:10:54 -03:00
Fabio Arnold
d190b88854 OS X: fix clang compile error over non-existent simpleini lib 2016-02-21 01:03:10 +01:00
David Capello
67878a21cb Save brush with images correctly when "Save Brush" button is used 2016-02-18 14:43:40 -03:00
David Capello
9521ed3079 Merge branch 'master' 2016-02-18 14:15:04 -03:00
David Capello
15e10ad9f6 Add touch magnify event to support OS X trackpad gesture 2016-02-18 13:58:45 -03:00
David Capello
ef4a4822da Call onEnterState() from base class in SelectBoxState and StandbyState 2016-02-18 11:40:11 -03:00
David Capello
67afc5f621 Remove unused variable in FileList::onPaint() 2016-02-18 10:58:58 -03:00
David Capello
237a46588c Fix if-condition inside load_xml_image() 2016-02-18 10:58:22 -03:00
David Capello
802b8a0a10 Fix performance problem when we change color sliders with mouse movement 2016-02-17 18:32:34 -03:00
David Capello
64deb6ed87 Remove mongoose code
The webserver isn't functional yet, and mongoose license is GPL now.
2016-02-16 18:52:15 -03:00
David Capello
7750982af6 Support loading interlaced PNG files in png decoder (PngFormat::onLoad()) 2016-02-16 18:18:29 -03:00
David Capello
fd71ceb4c9 Fix shading ink for sprites with more than 256 colors
When the shading ink is used on RGBA sprites, we can have color palettes
with more than 256 colors. In this way the shade will contain entries
with indexes >= 256.
2016-02-16 17:11:30 -03:00
David Capello
24e329ffeb Show ink selector even when a custom brush is selected
Related to #945, anyway it needs more work so we can mix the custom
brush as a color source for the current ink.
2016-02-15 20:40:37 -03:00
David Capello
8ca5b0c2f7 Shade ink should use the full palette when we select just one color (fix #947) 2016-02-15 17:30:01 -03:00
David Capello
dbb8a17d47 Fix bug restoring frame duration after undoing a "remove frame" (fix #965) 2016-02-15 17:13:23 -03:00
David Capello
e2e5fbf3f1 Fix crash when ContextBar::InkShadesField is clicked and it's empty 2016-02-15 17:07:34 -03:00
David Capello
1588e834c3 Fix artifacts when scrolling on widgets with sub-children (fix #963)
This bug was introduced in b0650f6afe
To fix this issue we've to remove kPaintMessages from the message queue
for widgets that were moved. Those pending paint messages aren't valid
anymore because the widget was invalidated again.
2016-02-15 15:54:54 -03:00
David Capello
c49ec61fa0 Minor refactor: rename DocumentView::getEditor/Document() -> editor/document() 2016-02-13 01:33:43 -03:00
David Capello
3400cdba8b Hide software cursor when mouse leaves window on Linux (fix #948)
Now we generate MouseEvent/Leave she events when Allegro4 _mouse_on
changes from 1 to 0 or vice-versa on Linux.
2016-02-12 18:59:11 -03:00
David Capello
7b8b2dae53 Remove mouse speed modifications from Allegro4/X11 port
This might be related to #957
2016-02-12 18:56:15 -03:00
David Capello
e2a72352c5 Fix minor cast int <-> double issues in src/app/color.cpp 2016-02-12 18:53:59 -03:00
David Capello
0da82a80d0 Fix condition in load_xml_image() function in AppBrushes 2016-02-12 15:08:12 -03:00
David Capello
e46cebe5a0 Fix Skia/OS X compilation errors in skia_window_osx.mm 2016-02-12 14:41:54 -03:00
David Capello
ade23a4151 Fix color tests 2016-02-12 14:41:25 -03:00
David Capello
4a76d8150c Include needed <cmath> for clang 2016-02-12 14:03:27 -03:00
David Capello
3f47c23cd8 Add more precision to HSV <-> RGB conversion (fix #961)
This patch fixes problems using the eyedropper tool in HSB mode. If we
use "int" precision for HSB values, the resulting RGB color could be
different from the original one.
2016-02-12 13:01:32 -03:00
David Capello
19f8aad2ef Merge branch 'fix-keys' 2016-02-12 12:24:19 -03:00
David Capello
882a67fb6a Fix key modifiers when we draw on Skia/Win (fix #954) 2016-02-12 12:23:34 -03:00
David Capello
228c96b943 Add key modifiers in Skia/Win port to avoid calling she::is_key_pressed()
Related to #954
2016-02-12 12:21:53 -03:00
David Capello
ff0c2c2770 Merge branch 'ryb-color-wheel' 2016-02-12 10:50:57 -03:00
David Capello
c1ae065c2c Add RYB color wheel (related to #707) 2016-02-12 10:49:33 -03:00
David Capello
1f319cd2d1 Don't change MiniPlayButton state in preview window when we scroll it (fix #958) 2016-02-11 21:39:22 -03:00
David Capello
7b8d9102e1 Add independent scroll/zoom values in preview window per document (fix #959) 2016-02-11 21:09:31 -03:00
David Capello
ad9b7ce645 Remove unused variable from MovingSymmetryState 2016-02-11 12:21:37 -03:00
David Capello
127a5e76df Enable/disable GPU support on Skia backend if the skia_skgpu lib is available 2016-02-10 00:49:20 -03:00
David Capello
fc58daa814 Add support for ANGLE (D3D) on Skia port
Anyway we've disable the GPU support temporally (related to #960)
2016-02-09 23:12:59 -03:00
David Capello
d244af8fc1 Remove invalid ASSERT in AppBrushes::save() 2016-02-07 15:02:16 -03:00
David Capello
e843e7a9ba Do not overlap the menubar with a menubox 2016-02-07 14:41:43 -03:00
David Capello
61927478ff Update copyright year in VERSIONINFO 2016-02-05 17:31:27 -03:00
David Capello
07a3ceded8 Fix website URL in VERSIONINFO comments 2016-02-05 17:31:18 -03:00
David Capello
4f1431ba2e Add the correct window icon in the Skia/Win port 2016-02-05 17:30:10 -03:00
David Capello
5fff73aded Avoid crash when we start the Skia window on WinXP
On Windows XP, after creating the HWND, when we add the scrollbars with
SetScrollInfo() in WinWindow<T>::createHwnd(), it generates a WM_SIZE,
which is calling resizeImpl(). And as SkiaWindow expects an already
created SkiaDisplay on SkiaWindow::resizeImpl(), the program crashes.
2016-02-05 17:10:01 -03:00
David Capello
87e5be45a9 Avoid deleting two times the direct SkSurface 2016-02-05 16:34:02 -03:00
David Capello
a77ae98fd0 Add keyboard shortcuts to change the color selector type (spectrum/color wheel) 2016-02-05 14:41:35 -03:00
David Capello
9c653ef86e Avoid missing DDE files because the loading dialog box/progress bar is open 2016-02-04 13:07:46 -03:00
David Capello
210ffc090e Open files from Windows Explorer using DDE so we re-use the running instance
Fix #477
2016-02-04 13:07:36 -03:00
David Capello
72338a6f26 Remove unused updater_lib variable in src/CMakeLists.txt 2016-02-02 12:21:01 -03:00
David Capello
aa7d3d8918 Minor change in ModifySelectionCommand::applyModifier()
Use local variable dstImage.
2016-02-01 18:24:34 -03:00
David Capello
bf632656c3 Remove unused local variable in FileList::onPaint() 2016-02-01 18:24:06 -03:00
David Capello
bb41bd32b4 Don't change cel user data when cel opacity is the only modified field 2016-02-01 18:09:02 -03:00
David Capello
be57d0332f Fix setting opacity or user data of linked cels when the first cel isn't included in the active range 2016-02-01 18:05:40 -03:00
David Capello
99d504a3aa Fix cel opacity slider enabled-status when we click a new cel in the Timeline
The timeline must update its internal range before it fires an active
site changed (Editor::setFrame/Layer()). So
ContextObserver::onActiveSiteChange() observers can access the updated
timeline range.
2016-02-01 15:21:17 -03:00
David Capello
3d23336815 Copy user data when we unlink cels 2016-02-01 10:58:29 -03:00
David Capello
b3a95266d7 Invalidate/redraw timeline in a general document update
This is needed if we change the user data color for some cels and we're
navigating the Undo History to undo/redo those changes. In this way we
see how the user data is updated in the Timeline.
2016-02-01 10:56:03 -03:00
David Capello
2f791b5ad1 Fix several problems with timeline and cel opacity slider
* Enable cel opacity slider when any transparent cel is selected
  (it doesn't matter if there are cels from a background layer selected
   too, the slider must be enabled for the transparent ones)
* Enable editing user data when we have a range of cels selected
  (it doesn't matter if the active cel is nullptr, we've to enable
   editing user data if there is any selected cel in the timeline range)
2016-02-01 10:52:05 -03:00
David Capello
3a79cf5559 Fix crash when the palette editor is slowly resized to its minimum size (fix #949)
It was caused by a division by zero.
2016-01-31 19:57:33 -03:00
David Capello
81d39664a7 Add an alternative message to debug crashes in compiled versions
As .dmp files are useful only for official releases (i.e. when we have the
compiled .exe+.pdb), this is an alternative message to stop receiving
.dmp files at support@aseprite.org that cannot be used to debug a crash.
2016-01-31 19:49:24 -03:00
David Capello
c8814ffb75 Fix ASSERT in ClipboardManager::~ClipboardManager() 2016-01-30 09:16:46 -03:00
David Capello
4dedc1e8d2 Fix crash pasting a document range from a closed document
Steps to reproduce the crash without this patch:
1. Create a new sprite
2. Copy the first cel from the Timeline
3. Create a new sprite
4. Close the first sprite
5. Paste the copied cel to the second sprite

The program crashed because the original sprite is invalid now. With this
patch we observe the main DocumentsObserver to check when the document is
closed/destroyed. In this way we can invalidate the clipboard content.
2016-01-30 09:13:46 -03:00
David Capello
40c834f50a Open files from Finder in Skia/OSX port 2016-01-29 16:07:39 -03:00
David Capello
b0650f6afe Generalize View::setViewScroll() to blit valid/scrollable region automatically
With this change we are removing specific code to scroll the Editor widget.
Now if we use Editor::setEditorScroll() to scroll it should work as
View::setViewScroll(). In this way we remove the ugly "blitValidRegion"
parameter from setEditorScroll().

Changes:
* Removed Widget::scrollRegion() because each widget must control
  valid/invalid regions after a ui::move_region() in a very specific way
  (see View::setViewScroll() or Window::moveWindow)
* Invalidate the whole widget on Widget::setBoundsQuietly()
* Fixed problems blitting invalid regions/not yet updated/painted: using
  the new ui::Manager::m_invalidRegion.
* Added View::onSetViewScroll() and View::onScrollRegion()
* Added FileListView to avoid moving the thumbnail region when we scroll
2016-01-05 16:37:52 -03:00
David Capello
1260cf12c5 Minor comment changes in widget.h 2016-01-05 16:28:54 -03:00
David Capello
e64cc958ce Minor change/renames in Widget::flushRedraw() 2016-01-04 17:50:21 -03:00
David Capello
3bad2af2f3 Make Widget::offsetWidgets() function public 2016-01-04 17:49:40 -03:00
David Capello
bf9994387d Add some gfx::Region operators 2016-01-04 17:48:56 -03:00
David Capello
eba8de0306 Fix slow scroll/selection movement with Alleg4 port (fix #929) 2016-01-04 12:15:23 -03:00
Ying-Ruei Liang (KK)
f1b597d4ed Apply brush size when clicking on brush icon 2016-01-02 11:01:44 +08:00
David Capello
910612101a Fix slow performance pressing Alt or Ctrl key on Editor in Alleg4/Win port 2015-12-30 17:30:20 -03:00
David Capello
0f28e216ba Fix Manager::pumpQueue() when DEBUG_PAINT_EVENTS is defined 2015-12-30 12:24:26 -03:00
David Capello
e97a7070d6 Fix she::Event::setRepeat() calls on Skia/Win WM_KEYUP/DOWN processing 2015-12-30 10:33:44 -03:00
David Capello
5b38caed00 Reduce code in StateWithWheelBehavior::onMouseWheel() 2015-12-30 10:29:13 -03:00
David Capello
a5a044f333 Make main window key and order to front in Skia/OSX port 2015-12-28 18:33:57 -03:00
David Capello
851413e2a6 Remove unused variable in BrushPopup::regenerate() 2015-12-28 18:02:38 -03:00
David Capello
a6544d92af Improve default window size on Skia/Win port (fix #693) 2015-12-28 18:02:07 -03:00
David Capello
d496236d08 Add scrollbars to Skia/Win SkiaDisplay to support trackpad scroll messages 2015-12-28 16:54:50 -03:00
David Capello
8996d82d21 Redraw ColorBar when we change the active state in the Undo History window 2015-12-28 16:54:14 -03:00
David Capello
be214b715b Fix hang on Skia/Win when we press the HWND close button and an ui::Alert is shown
We don't have to close the OS window when its close button is pressed.
We just generate an CloseDisplay event and the client (app/ui layer) must
process it (e.g. check if there are no unsaved changes) and then close
the she::Display manually.
2015-12-28 16:31:57 -03:00
David Capello
a43f7cfa66 Fix crash disabling GPU acceleration on Skia/Win port 2015-12-28 15:56:41 -03:00
David Capello
49ad91dd79 Fix argc/argv parameters for app_main() in Skia/Win port 2015-12-28 15:34:00 -03:00
David Capello
199a3db278 Don't scroll invalid areas in Widget::scrollRegion() 2015-12-28 13:37:01 -03:00
David Capello
5074ef2d68 Handle several UI mouse movement events at once if they are in the she layer queue 2015-12-28 13:02:45 -03:00
David Capello
4d629b5f70 Update Skia port to support m48 version 2015-12-28 12:13:07 -03:00
David Capello
c8abf0cfc7 Fix regression: Show left/right mouse button triggers in keyboard shortcuts 2015-12-26 14:52:29 -03:00
David Capello
7b5827a151 Modify style of colored layers and cels in Timeline
Now colored layers/cels are filled with the user-defined color as
background and the text in the foreground.
2015-12-23 19:57:31 -03:00
David Capello
db13644e0a Fix problem setting cel color in all cels when a range is selected in Timeline 2015-12-23 14:19:09 -03:00
David Capello
5e67441af3 Fix logging string in GuiXml() ctor 2015-12-22 20:10:01 -03:00
David Capello
1c7ef06a4b Minor change in ResourceFinder logging strings 2015-12-22 20:08:37 -03:00
David Capello
5725b3bbf1 Load user brushes if the file exists and continue in case of error (fix #911) 2015-12-22 20:04:44 -03:00
David Capello
ff507af308 Redraw editor when symmetry is enabled/disabled
This redraw issue appears when we assign a key to switch the global
symmetry visibility (SymmetryModeCommand).
2015-12-22 19:05:11 -03:00
David Capello
07c3853bab Add the correct recent filename after saving a sequence of files 2015-12-22 18:07:06 -03:00
David Capello
978145ba7a Add warning before we save a sequence of bitmaps (fix #902) 2015-12-22 18:00:01 -03:00
David Capello
2f2bd40c84 Replace package name in src/file/file.cpp with PACKAGE macro 2015-12-22 17:55:35 -03:00
David Capello
3543b086d1 Add option to keep the selection after Edit > Clear (fix #907) 2015-12-22 17:49:21 -03:00
David Capello
e79236b3a3 Add JSON data format into Export Sprite Sheet UI 2015-12-22 17:34:51 -03:00
David Capello
65dd457847 Reduce size hint for ui::ComboBox 2015-12-22 17:14:26 -03:00
David Capello
2cac6a0706 Don't show shading on effect tools (Eraser, Blur, Jumble) 2015-12-22 17:05:33 -03:00
David Capello
b5dd02eb46 Export user data in JSON data 2015-12-22 16:53:06 -03:00
David Capello
9c42a7b31b Merge branch 'master' 2015-12-22 15:57:44 -03:00
David Capello
4c58441823 Redraw Timeline when layer/cel user color is changed 2015-12-22 13:18:08 -03:00
David Capello
3252013134 Fix problem showing brush boundaries when the active shade includes index 0 2015-12-22 12:48:15 -03:00
David Capello
e8ecbbb4d7 Merge branch 'master' 2015-12-22 10:56:56 -03:00
David Capello
16e13d89c2 Minor changes in base/README 2015-12-22 10:55:54 -03:00
David Capello
6fb5258e51 Load/save custom brushes 2015-12-22 10:55:15 -03:00
David Capello
718888df91 Add XML declaration to keyboard shortcuts XML file 2015-12-22 10:24:25 -03:00
David Capello
26e4678d2d Add functions to encode/decode data in base64 2015-12-21 13:44:02 -03:00
David Capello
7ab863303e Move LOG() to base library
Changes:
- Moved verbose_log (in app module) to base_log (in base library)
- Added base_set_log_filename() to start logging and close the log file
- LoggerModule() is implemented using thse new base library functions

Fix #899
2015-12-21 12:36:44 -03:00
David Capello
3bcda8c1b1 Replace DLOG() with TRACE() 2015-12-21 12:30:21 -03:00
Ying-Ruei Liang (KK)
1cf82697ef Add "apply" button to options window 2015-12-20 23:58:25 +08:00
David Capello
fcbb364085 Add "Play Once" option in "Play" button popup 2015-12-18 18:51:30 -03:00
David Capello
38128f7346 Fix bug reading (int/bool) parameters that aren't specified in Params
This fix a crash using ModifySelectionCommand commands.
2015-12-17 17:59:46 -03:00
David Capello
70127f19e1 Fix closing the whole user data popup when we're selecting the user data color 2015-12-17 16:34:57 -03:00
David Capello
6ec07d5e10 Fix comment for ui::PopupWindow::setHotRegion() member function 2015-12-17 15:46:13 -03:00
David Capello
a3e77a657a Update context bar controls correctly when a new brush type is selected from a brush slot 2015-12-17 15:21:44 -03:00
David Capello
7a553f5c98 Link with skia_opts_avx.lib in Skia port
We're using m48 branch in Skia library.
2015-12-17 13:43:18 -03:00
David Capello
3845d6a31a Fix bugs setting BrushSlot flags from BrushPopup
E.g. We cannot set flags in a recently deleted BrushSlot after
show_popup_menu().
2015-12-17 13:37:22 -03:00
David Capello
0fbe3acfd0 Remove BrushPopupDelegate
At this moment we prefer to use AppBrushes and ContextBar directly
from BrushPopup.
2015-12-17 13:24:44 -03:00
David Capello
51e3ab178d Merge branch 'new-brush-popup' 2015-12-16 18:45:24 -03:00
David Capello
3b9ba0d7d2 Add missing members to SkiaDisplay port 2015-12-16 18:45:01 -03:00
David Capello
403e3ee726 Add popup on each BrushSlot to enable/disable params
Converted BrushSlotParams into a xml widget.
2015-12-16 18:14:04 -03:00
David Capello
0cdc71bf05 Add possibility to save brush type/size/angle, fg/bg colors, ink type/opacity, shade, etc. into brush slots
Fix #904
2015-12-16 17:27:04 -03:00
David Capello
1f513a1ed5 Restore selected ButtonSet item when we offer the mouse capture
When a ButtonSet triggers an onClick() when a mouse up message is received
(ButtonSet::m_multipleSelection == true), in case the mouse capture is
offered to other ButtonSet, we've to restore the selected item when we
capture the mouse, because we've never generated the onClick() event
in the first place.
2015-12-16 16:55:49 -03:00
David Capello
0f35102a4b Add show_popup_menu() internal function in brush_popup.cpp 2015-12-16 10:49:15 -03:00
David Capello
bd99a30146 Avoid closing BrushPopup when we click the menu popup option 2015-12-16 10:02:52 -03:00