mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-04 05:50:15 +00:00
Merge branch 'main' into beta
This commit is contained in:
commit
de68fddbe7
@ -1,5 +1,5 @@
|
||||
# Aseprite
|
||||
# Copyright (C) 2018-2020 Igara Studio S.A.
|
||||
# Copyright (C) 2018-2021 Igara Studio S.A.
|
||||
# Copyright (C) 2001-2018 David Capello
|
||||
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
@ -292,8 +292,7 @@ if(USE_SHARED_CMARK)
|
||||
find_path(CMARK_INCLUDE_DIRS NAMES cmark.h)
|
||||
else()
|
||||
add_definitions(-DCMARK_STATIC_DEFINE)
|
||||
set(CMARK_LIBRARIES libcmark_static)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/third_party/cmark)
|
||||
set(CMARK_LIBRARIES cmark_static)
|
||||
endif()
|
||||
|
||||
if(REQUIRE_CURL)
|
||||
|
13
README.md
13
README.md
@ -51,12 +51,9 @@ You can ask for help in:
|
||||
|
||||
Aseprite is being developed by [Igara Studio](https://www.igarastudio.com/):
|
||||
|
||||
* [David Capello](https://davidcapello.com/): Lead developer,
|
||||
bug fixing & new features in desktop & web, and user support.
|
||||
* [Gaspar Capello](https://github.com/Gasparoken): Developer,
|
||||
bug fixing & new features in desktop, and user support.
|
||||
* [Martin Capello](https://github.com/martincapello): Developer,
|
||||
new store website.
|
||||
* [David Capello](https://davidcapello.com/)
|
||||
* [Gaspar Capello](https://github.com/Gasparoken)
|
||||
* [Martin Capello](https://github.com/martincapello)
|
||||
|
||||
## Credits
|
||||
|
||||
@ -64,6 +61,10 @@ The default Aseprite theme was introduced in v0.8, created by:
|
||||
|
||||
* [Ilija Melentijevic](https://ilkke.net/)
|
||||
|
||||
And the dark theme version introduced in v1.3-beta1 by:
|
||||
|
||||
* [Nicolas Desilets](https://twitter.com/MapleGecko)
|
||||
|
||||
Aseprite includes color palettes created by:
|
||||
|
||||
* [Richard "DawnBringer" Fhager](http://pixeljoint.com/p/23821.htm), [16 colors](http://pixeljoint.com/forum/forum_posts.asp?TID=12795), [32 colors](http://pixeljoint.com/forum/forum_posts.asp?TID=16247).
|
||||
|
@ -6,27 +6,23 @@
|
||||
<vbox>
|
||||
<label text="" id="title" />
|
||||
<label text="Animated sprite editor && pixel art tool" />
|
||||
<separator text="Developers:" horizontal="true" />
|
||||
<grid columns="2">
|
||||
<link text="David Capello" url="https://twitter.com/davidcapello" />
|
||||
<label text="- Lead developer, new features && bug fixing in desktop && web" />
|
||||
<link text="Gaspar Capello" url="https://twitter.com/Gasparoken" />
|
||||
<label text="- Developer, new features && bug fixing in desktop" />
|
||||
<link text="Martin Capello" url="https://twitter.com/martincapell0" />
|
||||
<label text="- Developer, new store website" />
|
||||
|
||||
<separator text="Contributors:" horizontal="true" cell_hspan="2" />
|
||||
<link text="Ilija Melentijevic" url="https://ilkke.net/" />
|
||||
<label text="- Default theme && graphics introduced in v0.8" />
|
||||
<link text="Nicolas Desilets" url="https://twitter.com/MapleGecko" />
|
||||
<label text="- Default dark theme introduced in v1.3" />
|
||||
|
||||
<hbox cell_hspan="2">
|
||||
<link text="Other Contributors" url="https://www.aseprite.org/contributors/" />
|
||||
<label text="&&" />
|
||||
<link text="Third-Party Projects" url="" id="licenses" />
|
||||
<hbox homogeneous="true">
|
||||
<hbox>
|
||||
<vbox expansive="true">
|
||||
<separator text="Developer Team" horizontal="true" />
|
||||
<link text="David Capello" url="https://twitter.com/davidcapello" />
|
||||
<link text="Gaspar Capello" url="https://twitter.com/Gasparoken" />
|
||||
<link text="Martin Capello" url="https://twitter.com/martincapell0" />
|
||||
<vbox minheight="8" />
|
||||
</vbox>
|
||||
<separator vertical="true" />
|
||||
</hbox>
|
||||
</grid>
|
||||
<vbox>
|
||||
<separator text="Credits" horizontal="true" cell_hspan="2" />
|
||||
<link text="Contributors" url="" id="credits" />
|
||||
<link text="Open Source Projects" url="" id="licenses" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
<separator horizontal="true" />
|
||||
<hbox>
|
||||
<label text="Copyright (C) 2001-2021" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2020 Igara Studio S.A.
|
||||
// Copyright (C) 2020-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2016 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -180,7 +180,7 @@ AppBrushes::AppBrushes()
|
||||
m_standard.push_back(BrushRef(new Brush(kLineBrushType, 7, 44)));
|
||||
|
||||
try {
|
||||
std::string fn = userBrushesFilename();
|
||||
std::string fn = m_userBrushesFilename = userBrushesFilename();
|
||||
if (base::is_file(fn))
|
||||
load(fn);
|
||||
}
|
||||
@ -191,7 +191,8 @@ AppBrushes::AppBrushes()
|
||||
|
||||
AppBrushes::~AppBrushes()
|
||||
{
|
||||
save(userBrushesFilename());
|
||||
if (!m_userBrushesFilename.empty())
|
||||
save(m_userBrushesFilename);
|
||||
}
|
||||
|
||||
AppBrushes::slot_id AppBrushes::addBrushSlot(const BrushSlot& brush)
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2021 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2016 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -12,6 +13,7 @@
|
||||
#include "doc/brushes.h"
|
||||
#include "obs/signal.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace app {
|
||||
@ -49,6 +51,7 @@ namespace app {
|
||||
|
||||
doc::Brushes m_standard;
|
||||
BrushSlots m_slots;
|
||||
std::string m_userBrushesFilename;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2020 Igara Studio S.A.
|
||||
// Copyright (C) 2020-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -44,6 +44,11 @@ void AboutCommand::onExecute(Context* context)
|
||||
window.closeWindow(nullptr);
|
||||
App::instance()->mainWindow()->showBrowser("docs/LICENSES.md");
|
||||
});
|
||||
window.credits()->Click.connect(
|
||||
[&window]{
|
||||
window.closeWindow(nullptr);
|
||||
App::instance()->mainWindow()->showBrowser("README.md", "Authors");
|
||||
});
|
||||
window.openWindowInForeground();
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,8 @@ public:
|
||||
return m_file;
|
||||
}
|
||||
|
||||
void loadFile(const std::string& inputFile) {
|
||||
void loadFile(const std::string& inputFile,
|
||||
const std::string& section = std::string()) {
|
||||
std::string file = inputFile;
|
||||
{
|
||||
ResourceFinder rf;
|
||||
@ -121,9 +122,8 @@ public:
|
||||
cmark_parser_feed(parser, "\n```\n", 5);
|
||||
|
||||
cmark_node* root = cmark_parser_finish(parser);
|
||||
|
||||
if (root) {
|
||||
processNode(root);
|
||||
processNode(root, section);
|
||||
cmark_node_free(root);
|
||||
}
|
||||
fclose(fp);
|
||||
@ -140,6 +140,16 @@ public:
|
||||
FileChange();
|
||||
}
|
||||
|
||||
void focusSection() {
|
||||
View* view = View::getView(this);
|
||||
if (m_sectionWidget) {
|
||||
int y = m_sectionWidget->bounds().y - bounds().y;
|
||||
view->setViewScroll(gfx::Point(0, y));
|
||||
|
||||
m_sectionWidget = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void layoutElements(int width,
|
||||
std::function<void(const gfx::Rect& bounds,
|
||||
@ -265,7 +275,8 @@ private:
|
||||
delete firstChild();
|
||||
}
|
||||
|
||||
void processNode(cmark_node* root) {
|
||||
void processNode(cmark_node* root,
|
||||
const std::string& section) {
|
||||
clear();
|
||||
|
||||
m_content.clear();
|
||||
@ -293,8 +304,11 @@ private:
|
||||
}
|
||||
else {
|
||||
m_content += text;
|
||||
if (inHeading)
|
||||
if (inHeading) {
|
||||
closeContent();
|
||||
if (section == text)
|
||||
m_sectionWidget = lastChild();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -520,6 +534,7 @@ private:
|
||||
|
||||
std::string m_file;
|
||||
std::string m_content;
|
||||
Widget* m_sectionWidget = nullptr;
|
||||
};
|
||||
|
||||
BrowserView::BrowserView()
|
||||
@ -546,9 +561,10 @@ BrowserView::~BrowserView()
|
||||
delete m_textBox;
|
||||
}
|
||||
|
||||
void BrowserView::loadFile(const std::string& file)
|
||||
void BrowserView::loadFile(const std::string& file,
|
||||
const std::string& section)
|
||||
{
|
||||
m_textBox->loadFile(file);
|
||||
m_textBox->loadFile(file, section);
|
||||
}
|
||||
|
||||
std::string BrowserView::getTabText()
|
||||
@ -575,6 +591,9 @@ void BrowserView::onWorkspaceViewSelected()
|
||||
{
|
||||
if (auto statusBar = StatusBar::instance())
|
||||
statusBar->clearText();
|
||||
|
||||
if (m_textBox)
|
||||
m_textBox->focusSection();
|
||||
}
|
||||
|
||||
bool BrowserView::onCloseView(Workspace* workspace, bool quitting)
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2021 Igara Studio S.A.
|
||||
// Copyright (C) 2016 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -20,7 +21,8 @@ namespace app {
|
||||
BrowserView();
|
||||
~BrowserView();
|
||||
|
||||
void loadFile(const std::string& file);
|
||||
void loadFile(const std::string& file,
|
||||
const std::string& section = std::string());
|
||||
|
||||
// TabView implementation
|
||||
std::string getTabText() override;
|
||||
|
@ -273,12 +273,13 @@ bool MainWindow::isHomeSelected() const
|
||||
return (m_homeView && m_workspace->activeView() == m_homeView);
|
||||
}
|
||||
|
||||
void MainWindow::showBrowser(const std::string& filename)
|
||||
void MainWindow::showBrowser(const std::string& filename,
|
||||
const std::string& section)
|
||||
{
|
||||
if (!m_browserView)
|
||||
m_browserView = new BrowserView;
|
||||
|
||||
m_browserView->loadFile(filename);
|
||||
m_browserView->loadFile(filename, section);
|
||||
|
||||
if (!m_browserView->parent()) {
|
||||
m_workspace->addView(m_browserView);
|
||||
|
@ -73,7 +73,8 @@ namespace app {
|
||||
void showHome();
|
||||
void showDefaultStatusBar();
|
||||
void showDevConsole();
|
||||
void showBrowser(const std::string& filename);
|
||||
void showBrowser(const std::string& filename,
|
||||
const std::string& section = std::string());
|
||||
bool isHomeSelected() const;
|
||||
|
||||
Mode getMode() const { return m_mode; }
|
||||
|
17
third_party/CMakeLists.txt
vendored
17
third_party/CMakeLists.txt
vendored
@ -1,4 +1,5 @@
|
||||
# ASEPRITE
|
||||
# Aseprite
|
||||
# Copyright (C) 2021 Igara Studio S.A.
|
||||
# Copyright (C) 2001-2018 David Capello
|
||||
|
||||
include_directories(.)
|
||||
@ -84,20 +85,6 @@ add_subdirectory(fmt)
|
||||
if(NOT USE_SHARED_CMARK)
|
||||
set(CMARK_TESTS OFF CACHE BOOL "Build cmark tests and enable testing")
|
||||
add_subdirectory(cmark)
|
||||
set(cmark_headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmark/src/cmark.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmark/src/cmark_export.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmark/src/cmark_version.h)
|
||||
foreach(fn ${cmark_headers})
|
||||
get_filename_component(fn_name "${fn}" NAME)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${fn} ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name}
|
||||
MAIN_DEPENDENCY ${fn})
|
||||
list(APPEND copy_cmark_headers ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name})
|
||||
endforeach()
|
||||
add_custom_target(copy_cmark_headers DEPENDS ${copy_cmark_headers})
|
||||
add_dependencies(libcmark_static copy_cmark_headers)
|
||||
endif()
|
||||
|
||||
# JSON
|
||||
|
2
third_party/cmark
vendored
2
third_party/cmark
vendored
@ -1 +1 @@
|
||||
Subproject commit 5255e2d5717dc7a265ca79404d387ef8abe8c004
|
||||
Subproject commit 8a023286198a7e408398e282f293e3b0baebb644
|
Loading…
Reference in New Issue
Block a user