mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-13 06:22:51 +03:00
eepp: Added UIImageViewer new tool widget to view images.
Added a new UIMessageBox event: `Event::OnDiscard`, this will triggered when window is closed without confirmation (`Event::OnConfirm`). And now `Event::OnCancel` is only triggered when is manually cancelled (click the cancel button). ecode: Greatly improved image viewing experience. Now you can switch images from the same directory with the mouse wheel, also zoom, translate and rotate the images, images open in a new tab by default but quick-preview can be activated in `Settings -> Window -> Quick Preview Images` (SpartanJ/ecode#96).
This commit is contained in:
@@ -1288,11 +1288,18 @@ UIMenu* SettingsMenu::createWindowMenu() {
|
||||
mWindowMenu
|
||||
->addCheckBox( i18n( "use_native_file_dialogs", "Enable Native File Dialogs" ),
|
||||
mApp->getConfig().ui.nativeFileDialogs )
|
||||
->setTooltipText(
|
||||
i18n( "use_native_file_dialogs_tooltip",
|
||||
"Try to use the OS native file dialogs if they are available." ) )
|
||||
->setTooltipText( i18n( "use_native_file_dialogs_tooltip",
|
||||
"Try to use the OS native file dialogs if they are available." ) )
|
||||
->setId( "native-file-dialogs" );
|
||||
|
||||
mWindowMenu
|
||||
->addCheckBox( i18n( "quick_preview_images", "Quick Preview Images" ),
|
||||
mApp->getConfig().ui.imagesQuickPreview )
|
||||
->setTooltipText(
|
||||
i18n( "quick_preview_images_tooltip",
|
||||
"Instead of opening a new tab to view an image uses a quick-preview." ) )
|
||||
->setId( "quick-preview-images" );
|
||||
|
||||
mWindowMenu->addSeparator();
|
||||
|
||||
mWindowMenu
|
||||
@@ -1326,6 +1333,10 @@ UIMenu* SettingsMenu::createWindowMenu() {
|
||||
bool active = item->asType<UIMenuCheckBox>()->isActive();
|
||||
mApp->getConfig().ui.nativeFileDialogs = active;
|
||||
mApp->saveConfig();
|
||||
} else if ( "quick-preview-images" == item->getId() ) {
|
||||
bool active = item->asType<UIMenuCheckBox>()->isActive();
|
||||
mApp->getConfig().ui.imagesQuickPreview = active;
|
||||
mApp->saveConfig();
|
||||
} else {
|
||||
String text = String( event->getNode()->asType<UIMenuItem>()->getId() ).toLower();
|
||||
String::replaceAll( text, " ", "-" );
|
||||
|
||||
Reference in New Issue
Block a user