mirror of https://gitlab.com/nakst/essence
misc
This commit is contained in:
parent
db3f454bba
commit
c4b48f0698
|
@ -528,8 +528,20 @@ void ListItemGenerateThumbnailTask(Instance *, Task *task) {
|
|||
return; // There are no longer any list items visible for this file.
|
||||
}
|
||||
|
||||
EsFileInformation information = EsFileOpen(STRING(task->string), ES_FILE_READ | ES_NODE_FAIL_IF_NOT_FOUND);
|
||||
|
||||
if (ES_SUCCESS != information.error) {
|
||||
return; // The file could not be loaded.
|
||||
}
|
||||
|
||||
if (information.size > 64 * 1024 * 1024) {
|
||||
EsHandleClose(information.handle);
|
||||
return; // The file is too large.
|
||||
}
|
||||
|
||||
size_t fileBytes;
|
||||
void *file = EsFileReadAll(STRING(task->string), &fileBytes);
|
||||
void *file = EsFileReadAllFromHandle(information.handle, &fileBytes);
|
||||
EsHandleClose(information.handle);
|
||||
|
||||
if (!file) {
|
||||
return; // The file could not be loaded.
|
||||
|
|
|
@ -3742,7 +3742,7 @@ EsButton *EsButtonCreate(EsElement *parent, uint64_t flags, const EsStyle *style
|
|||
style = UIGetDefaultStyleVariant(style, parent);
|
||||
}
|
||||
|
||||
if (style == ES_STYLE_PUSH_BUTTON_NORMAL) {
|
||||
if (style == ES_STYLE_PUSH_BUTTON_NORMAL || style == ES_STYLE_PUSH_BUTTON_DANGEROUS) {
|
||||
flags |= ES_BUTTON_PUSH;
|
||||
} else if (style == ES_STYLE_PUSH_BUTTON_TOOLBAR || style == ES_STYLE_PUSH_BUTTON_TOOLBAR_MEDIUM
|
||||
|| style == ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG || style == ES_STYLE_PUSH_BUTTON_STATUS_BAR) {
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
// TODO Don't send key released messages if the focused window has changed.
|
||||
// TODO Blur clamping is incorrect with minimal repainting!
|
||||
|
||||
// Terminology:
|
||||
// Dynamic resize - flicker-free resizing in container windows with an embedded window owned by a separate process.
|
||||
// Direct update - paint first onto the video card's framebuffer, then onto the window manager's; used to reduce latency.
|
||||
// Fast scroll - scrolling by shifting the bits in the window's surface, rather than repainting the entire area.
|
||||
|
||||
struct EmbeddedWindow {
|
||||
void Destroy();
|
||||
void Close();
|
||||
|
|
Loading…
Reference in New Issue