mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 15:54:41 +00:00
Merge branch 'main' into beta
This commit is contained in:
commit
ffc7af2ee8
2
laf
2
laf
@ -1 +1 @@
|
|||||||
Subproject commit 02ed21d1214ff913150fe3caf1470f2ee0dc6f14
|
Subproject commit 1597f3550ad8cff3424a22b0deb1c49720dcb483
|
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2020-2021 Igara Studio S.A.
|
// Copyright (C) 2020-2022 Igara Studio S.A.
|
||||||
// Copyright (C) 2016-2018 David Capello
|
// Copyright (C) 2016-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -36,12 +36,28 @@ using namespace base::serialization::little_endian;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
clip::format custom_image_format = 0;
|
clip::format custom_image_format = 0;
|
||||||
|
bool show_clip_errors = true;
|
||||||
|
|
||||||
|
class InhibitClipErrors {
|
||||||
|
bool m_saved;
|
||||||
|
public:
|
||||||
|
InhibitClipErrors() {
|
||||||
|
m_saved = show_clip_errors;
|
||||||
|
show_clip_errors = false;
|
||||||
|
}
|
||||||
|
~InhibitClipErrors() {
|
||||||
|
show_clip_errors = m_saved;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void* native_window_handle() {
|
void* native_window_handle() {
|
||||||
return os::instance()->defaultWindow()->nativeHandle();
|
return os::instance()->defaultWindow()->nativeHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void custom_error_handler(clip::ErrorCode code) {
|
void custom_error_handler(clip::ErrorCode code) {
|
||||||
|
if (!show_clip_errors)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case clip::ErrorCode::CannotLock:
|
case clip::ErrorCode::CannotLock:
|
||||||
ui::Alert::show(Strings::alerts_clipboard_access_locked());
|
ui::Alert::show(Strings::alerts_clipboard_access_locked());
|
||||||
@ -301,6 +317,10 @@ bool Clipboard::getNativeBitmap(doc::Image** image,
|
|||||||
|
|
||||||
bool Clipboard::getNativeBitmapSize(gfx::Size* size)
|
bool Clipboard::getNativeBitmapSize(gfx::Size* size)
|
||||||
{
|
{
|
||||||
|
// Don't show errors when we are trying to get the size of the image
|
||||||
|
// only. (E.g. don't show "invalid image format error")
|
||||||
|
InhibitClipErrors inhibitErrors;
|
||||||
|
|
||||||
clip::image_spec spec;
|
clip::image_spec spec;
|
||||||
if (clip::get_image_spec(spec)) {
|
if (clip::get_image_spec(spec)) {
|
||||||
size->w = spec.width;
|
size->w = spec.width;
|
||||||
|
2
src/clip
2
src/clip
@ -1 +1 @@
|
|||||||
Subproject commit c46c49141f72dd753b260eea4e6d7b37413f0ff6
|
Subproject commit 2ada8b17b39bf41a669248a2be5c6e4be4c27f14
|
2
src/tga
2
src/tga
@ -1 +1 @@
|
|||||||
Subproject commit 16b8bb25e34bfb0193609012257502be62539d35
|
Subproject commit d537510d98bc9706675746d132fa460639254a78
|
@ -30,7 +30,7 @@ namespace gfx {
|
|||||||
|
|
||||||
namespace os {
|
namespace os {
|
||||||
class DrawTextDelegate;
|
class DrawTextDelegate;
|
||||||
class Sampling;
|
struct Sampling;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
Loading…
Reference in New Issue
Block a user