mirror of https://github.com/aseprite/aseprite.git
Compare commits
4 Commits
9d1076825e
...
f9777f14f2
Author | SHA1 | Date |
---|---|---|
|
f9777f14f2 | |
|
cef92c1a38 | |
|
22e72ab5cb | |
|
1e556678ba |
|
@ -180,8 +180,8 @@ if(ENABLE_ASEPRITE_EXE)
|
|||
|
||||
if(WIN32)
|
||||
set(main_resources
|
||||
main/resources_win32.rc
|
||||
main/settings.manifest)
|
||||
main/win/resources_win32.rc
|
||||
main/win/settings.manifest)
|
||||
endif()
|
||||
|
||||
add_executable(${main_target}
|
||||
|
|
|
@ -213,7 +213,7 @@ void ResourceFinder::includeDesktopDir(const char* filename)
|
|||
#ifdef _WIN32
|
||||
|
||||
std::vector<wchar_t> buf(MAX_PATH);
|
||||
HRESULT hr = SHGetFolderPath(NULL, CSIDL_DESKTOPDIRECTORY, NULL, SHGFP_TYPE_DEFAULT, &buf[0]);
|
||||
HRESULT hr = SHGetFolderPath(NULL, CSIDL_DESKTOP, NULL, SHGFP_TYPE_CURRENT, &buf[0]);
|
||||
if (hr == S_OK) {
|
||||
addPath(base::join_path(base::to_utf8(&buf[0]), filename));
|
||||
}
|
||||
|
|
|
@ -168,6 +168,21 @@ SelectLayerBoundariesOp get_select_layer_in_canvas_op(ui::Message* msg)
|
|||
return SelectLayerBoundariesOp::REPLACE;
|
||||
}
|
||||
|
||||
bool get_layer_index(LayerGroup* parent, const Layer* layer, layer_t& index)
|
||||
{
|
||||
for (Layer* child : parent->layers()) {
|
||||
if (child->isGroup() && get_layer_index(static_cast<LayerGroup*>(child), layer, index)) {
|
||||
return index;
|
||||
}
|
||||
|
||||
if (child == layer) {
|
||||
return true;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Timeline::Hit::Hit(int part, layer_t layer, col_t frame, ObjectId tag, int band)
|
||||
|
@ -4055,6 +4070,12 @@ layer_t Timeline::getLayerIndex(const Layer* layer) const
|
|||
return -1;
|
||||
}
|
||||
|
||||
layer_t Timeline::getLayerIndexFromSprite(const Layer* layer) const
|
||||
{
|
||||
layer_t index = 0;
|
||||
return get_layer_index(m_sprite->root(), layer, index) ? index : -1;
|
||||
}
|
||||
|
||||
bool Timeline::isLayerActive(const layer_t layerIndex) const
|
||||
{
|
||||
Layer* layer = getLayer(layerIndex);
|
||||
|
@ -4576,7 +4597,7 @@ void Timeline::onDrop(ui::DragEvent& e)
|
|||
|
||||
// Determine at which frame and layer the content was dropped on.
|
||||
frame_t frame = m_frame;
|
||||
layer_t layerIndex = getLayerIndex(m_layer);
|
||||
layer_t layerIndex = getLayerIndexFromSprite(m_layer);
|
||||
InsertionPoint insert = InsertionPoint::BeforeLayer;
|
||||
DroppedOn droppedOn = DroppedOn::Unspecified;
|
||||
TRACE("m_dropRange.type() %d\n", m_dropRange.type());
|
||||
|
@ -4602,7 +4623,7 @@ void Timeline::onDrop(ui::DragEvent& e)
|
|||
break;
|
||||
case Range::kLayers:
|
||||
droppedOn = DroppedOn::Layer;
|
||||
if (m_dropTarget.vhit != DropTarget::VeryBottom) {
|
||||
if (m_dropTarget.vhit != DropTarget::VeryBottom && !m_dropRange.selectedLayers().empty()) {
|
||||
auto* selectedLayer = *m_dropRange.selectedLayers().begin();
|
||||
layerIndex = getLayerIndex(selectedLayer);
|
||||
}
|
||||
|
|
|
@ -355,6 +355,8 @@ private:
|
|||
gfx::Point getMaxScrollablePos() const;
|
||||
doc::Layer* getLayer(int layerIndex) const;
|
||||
layer_t getLayerIndex(const Layer* layer) const;
|
||||
// Get layer index regardless of visibility in the UI.
|
||||
layer_t getLayerIndexFromSprite(const Layer* layer) const;
|
||||
bool isLayerActive(const layer_t layerIdx) const;
|
||||
bool isFrameActive(const col_t frame) const;
|
||||
bool isCelActive(const layer_t layerIdx, const col_t frame) const;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>aseprite</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>Document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Aseprite Sprite</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ase</string>
|
||||
<string>bmp</string>
|
||||
<string>flc</string>
|
||||
<string>fli</string>
|
||||
<string>gif</string>
|
||||
<string>ico</string>
|
||||
<string>jpeg</string>
|
||||
<string>jpg</string>
|
||||
<string>pcx</string>
|
||||
<string>png</string>
|
||||
<string>tga</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>Document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Aseprite Sprite</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>aseprite-extension</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>Extension.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Aseprite Extension</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Aseprite</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>aseprite</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.aseprite.Aseprite</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Aseprite</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.3</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.3</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Aseprite.icns</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.graphics-design</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2001-2025, Igara Studio S.A.
|
||||
All rights reserved.</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue