printing: Add printing support
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/165>
This commit is contained in:
parent
e96b9ccac9
commit
ae5ca76176
22 changed files with 936 additions and 49 deletions
273
data/resources/gtk/help-overlay.ui
Normal file
273
data/resources/gtk/help-overlay.ui
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="help_overlay">
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="section_name">shortcuts</property>
|
||||
<property name="max-height">12</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes" context="shortcut window">General Shortcuts</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Show Main Menu</property>
|
||||
<property name="accelerator">F10</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Copy Image to Clipboard</property>
|
||||
<property name="action-name">win.copy</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Move Image to Trash</property>
|
||||
<property name="action-name">win.trash</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Toggle Image Properties</property>
|
||||
<property name="action-name">win.toggle-properties</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Set as Background</property>
|
||||
<property name="action-name">win.set-background</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Toggle Fullscreen</property>
|
||||
<property name="action-name">win.toggle-fullscreen</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Leave Fullscreen</property>
|
||||
<property name="action-name">win.leave-fullscreen</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">New Window</property>
|
||||
<property name="action-name">app.new-window</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Open Help</property>
|
||||
<property name="action-name">app.help</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Show Keyboard Shortcuts</property>
|
||||
<property name="action-name">win.show-help-overlay</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Close Window</property>
|
||||
<property name="action-name">window.close</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Quit</property>
|
||||
<property name="action-name">app.quit</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes" context="shortcut window">Navigate Images</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
||||
<property name="accelerator">Right</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
||||
<property name="accelerator">Left</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
||||
<property name="accelerator">Left</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
||||
<property name="accelerator">Right</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">First Image</property>
|
||||
<property name="action-name">win.first</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Last Image</property>
|
||||
<property name="action-name">win.last</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes" context="shortcut window">Rotate Image</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Rotate Clockwise</property>
|
||||
<property name="accelerator"><Ctrl>R</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Rotate Counterclockwise</property>
|
||||
<property name="accelerator"><Ctrl><Shift>R</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes" context="shortcut window">Zoom Image</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Zoom In</property>
|
||||
<property name="accelerator"><Ctrl>plus plus</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Zoom Out</property>
|
||||
<property name="accelerator"><Ctrl>minus minus</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Best Fit</property>
|
||||
<property name="accelerator"><Ctrl>0 0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Original Scale</property>
|
||||
<property name="accelerator"><Ctrl>1 1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">200% Scale</property>
|
||||
<property name="accelerator"><Ctrl>2 2</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes" context="shortcut window">Pan View</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Pan Left</property>
|
||||
<property name="action-name">win.pan-left</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Pan Right</property>
|
||||
<property name="action-name">win.pan-right</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Pan Up</property>
|
||||
<property name="action-name">win.pan-up</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Pan Down</property>
|
||||
<property name="action-name">win.pan-down</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes" context="shortcut window">Gestures</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Zoom In</property>
|
||||
<property name="shortcut-type">gesture-stretch</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Zoom Out</property>
|
||||
<property name="shortcut-type">gesture-pinch</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Rotate Clockwise</property>
|
||||
<property name="shortcut-type">gesture-rotate-clockwise</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="title" translatable="yes" context="shortcut window">Rotate Counterclockwise</property>
|
||||
<property name="shortcut-type">gesture-rotate-counterclockwise</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 3 0 c -1.644531 0 -3 1.355469 -3 3 v 10.003906 c 0 1.644532 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355468 3 -3 v -8.503906 c 0 -0.265625 -0.105469 -0.519531 -0.292969 -0.707031 l -3.5 -3.5 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 2 h 8 v 1.5 c 0 1 0.5 1.5 1.5 1.5 h 1.5 v 8.003906 c 0 0.574219 -0.429688 1 -1 1 h -10 c -0.570312 0 -1 -0.425781 -1 -1 v -10.003906 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
|
||||
<path d="m 7 6 h 2 v -2 h -2 z m 0 0"/>
|
||||
<path d="m 7 9 h 2 v -2 h -2 z m 0 0"/>
|
||||
<path d="m 7 12 h 2 v -2 h -2 z m 0 0"/>
|
||||
<g fill-opacity="0.34902">
|
||||
<path d="m 10 12 h 2 v -2 h -2 z m 0 0"/>
|
||||
<path d="m 4 12 h 2 v -2 h -2 z m 0 0"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 848 B |
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 3 0 c -1.644531 0 -3 1.355469 -3 3 v 10.003906 c 0 1.644532 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355468 3 -3 v -8.503906 c 0 -0.265625 -0.105469 -0.519531 -0.292969 -0.707031 l -3.5 -3.5 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 2 h 8 v 1.5 c 0 1 0.5 1.5 1.5 1.5 h 1.5 v 8.003906 c 0 0.574219 -0.429688 1 -1 1 h -10 c -0.570312 0 -1 -0.425781 -1 -1 v -10.003906 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
|
||||
<path d="m 10 7 v 2 h 2 v -2 z m 0 0"/>
|
||||
<path d="m 7 7 v 2 h 2 v -2 z m 0 0"/>
|
||||
<path d="m 4 7 v 2 h 2 v -2 z m 0 0"/>
|
||||
<g fill-opacity="0.34902">
|
||||
<path d="m 4 10 v 2 h 2 v -2 z m 0 0"/>
|
||||
<path d="m 4 4 v 2 h 2 v -2 z m 0 0"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 841 B |
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 15 11 c 0 1.644531 -1.355469 3 -3 3 h -9 c -1.644531 0 -3 -1.355469 -3 -3 v -6 c 0 -1.644531 1.355469 -3 3 -3 h 7.5 c 0.265625 0 0.519531 0.105469 0.707031 0.292969 l 3.5 3.5 c 0.1875 0.1875 0.292969 0.441406 0.292969 0.707031 z m -2 0 v -4 h -1.5 c -1 0 -1.5 -0.5 -1.5 -1.5 v -1.5 h -7 c -0.570312 0 -1 0.429688 -1 1 v 6 c 0 0.570312 0.429688 1 1 1 h 9 c 0.570312 0 1 -0.429688 1 -1 z m -8.5 -6.035156 c -0.824219 0 -1.5 0.675781 -1.5 1.5 c 0 0.820312 0.675781 1.5 1.5 1.5 s 1.5 -0.679688 1.5 -1.5 c 0 -0.824219 -0.675781 -1.5 -1.5 -1.5 z m 0 1 c 0.28125 0 0.5 0.21875 0.5 0.5 s -0.21875 0.5 -0.5 0.5 s -0.5 -0.21875 -0.5 -0.5 s 0.21875 -0.5 0.5 -0.5 z m 0 0"/>
|
||||
<path d="m 13.460938 10 h -2.417969 c -0.558594 0 -1.09375 -0.195312 -1.523438 -0.550781 l -1.128906 -0.941407 c -0.804687 -0.671874 -1.972656 -0.675781 -2.78125 -0.003906 l -1.09375 0.898438 c -0.449219 0.375 -1.015625 0.578125 -1.597656 0.578125 h -1.339844 c -0.277344 0 -0.5 0.222656 -0.5 0.5 c 0 0.273437 0.222656 0.5 0.5 0.5 h 1.339844 c 0.816406 0 1.605469 -0.285157 2.234375 -0.804688 l 1.09375 -0.902343 c 0.4375 -0.363282 1.070312 -0.359376 1.503906 0.003906 l 1.128906 0.941406 c 0.609375 0.503906 1.371094 0.78125 2.164063 0.78125 h 2.417969 c 0.277343 0 0.5 -0.222656 0.5 -0.5 s -0.222657 -0.5 -0.5 -0.5 z m 0 0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 5 1 c -1.644531 0 -3 1.355469 -3 3 v 9 c 0 1.644531 1.355469 3 3 3 h 6 c 1.644531 0 3 -1.355469 3 -3 v -7.5 c 0 -0.265625 -0.105469 -0.519531 -0.292969 -0.707031 l -3.5 -3.5 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 2 h 4 v 1.5 c 0 1 0.5 1.5 1.5 1.5 h 1.5 v 7 c 0 0.570312 -0.429688 1 -1 1 h -6 c -0.570312 0 -1 -0.429688 -1 -1 v -9 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
|
||||
<path d="m 8 6 c -1.097656 0 -2 0.902344 -2 2 c 0 0.53125 0.210938 1.015625 0.550781 1.375 c -0.015625 0.011719 -0.03125 0.015625 -0.050781 0.027344 c -0.925781 0.535156 -1.5 1.527344 -1.5 2.597656 c 0 0.542969 0.441406 0.980469 0.980469 0.980469 h 4.039062 c 0.539063 0 0.980469 -0.4375 0.980469 -0.980469 c 0 -1.070312 -0.574219 -2.0625 -1.5 -2.597656 c -0.015625 -0.011719 -0.035156 -0.019532 -0.054688 -0.027344 c 0.34375 -0.359375 0.554688 -0.84375 0.554688 -1.375 c 0 -1.097656 -0.902344 -2 -2 -2 z m 0 1 c 0.558594 0 1 0.441406 1 1 s -0.441406 1 -1 1 s -1 -0.441406 -1 -1 s 0.441406 -1 1 -1 z m 0 3 c 0.34375 0 0.691406 0.089844 1 0.269531 c 0.566406 0.324219 0.933594 0.902344 0.992188 1.542969 c 0.007812 0.105469 -0.074219 0.1875 -0.179688 0.1875 h -3.605469 c -0.113281 0 -0.207031 -0.09375 -0.195312 -0.207031 c 0.0625 -0.632813 0.429687 -1.203125 0.988281 -1.523438 c 0.308594 -0.179687 0.65625 -0.269531 1 -0.269531 z m 0 0" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
3
data/resources/style-hc.css
Normal file
3
data/resources/style-hc.css
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
row.property label.title {
|
||||
opacity: 0.9;
|
||||
}
|
||||
32
data/resources/style.css
Normal file
32
data/resources/style.css
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* Overlay controls for next, zoom, fullscreen */
|
||||
button.osd.circular {
|
||||
min-width: 42px;
|
||||
min-height: 42px;
|
||||
}
|
||||
|
||||
flap.fullscreen-widget dimming, shadow, border, outline {
|
||||
background: none;
|
||||
}
|
||||
|
||||
row.property label.title {
|
||||
opacity: 0.55;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
row.property label.subtitle {
|
||||
opacity: 1.0;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
.drag-icon {
|
||||
margin: 16px;
|
||||
border-radius: 5px;
|
||||
outline: 2px solid white;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 200);
|
||||
}
|
||||
|
||||
lpprintpreview {
|
||||
background-color: rgb(240, 240, 240);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 14px 1px black;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue