mirror of
https://github.com/13hannes11/toolbx-tuner.git
synced 2024-09-03 23:21:00 +02:00
update screenshots and add screenshot mode
This commit is contained in:
55
build-aux/org.kuchelmeister.ToolboxTuner.Screenshot.json
Normal file
55
build-aux/org.kuchelmeister.ToolboxTuner.Screenshot.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"id" : "org.kuchelmeister.ToolboxTuner.Screenshot",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "46",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"sdk-extensions" : [
|
||||
"org.freedesktop.Sdk.Extension.rust-stable",
|
||||
"org.freedesktop.Sdk.Extension.llvm15"
|
||||
],
|
||||
"command" : "toolbox-tuner",
|
||||
"finish-args" : [
|
||||
"--talk-name=org.freedesktop.Flatpak",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--device=dri",
|
||||
"--env=RUST_LOG=toolbxtuner=debug",
|
||||
"--env=G_MESSAGES_DEBUG=none",
|
||||
"--env=RUST_BACKTRACE=1",
|
||||
"--share=ipc"
|
||||
],
|
||||
"build-options" : {
|
||||
"append-path" : "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm15/bin",
|
||||
"prepend-ld-library-path" : "/usr/lib/sdk/llvm15/lib",
|
||||
"build-args" : [
|
||||
"--share=network"
|
||||
],
|
||||
"env" : {
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER" : "clang",
|
||||
"CARGO_REGISTRIES_CRATES_IO_PROTOCOL" : "sparse",
|
||||
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS" : "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER" : "clang",
|
||||
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS" : "-C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold"
|
||||
},
|
||||
"test-args" : [
|
||||
"--socket=x11",
|
||||
"--share=network"
|
||||
]
|
||||
},
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "toolbox-tuner",
|
||||
"buildsystem" : "meson",
|
||||
"run-tests" : true,
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "dir",
|
||||
"path" : "../"
|
||||
}
|
||||
],
|
||||
"config-opts" : [
|
||||
"-Dprofile=screenshot"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,11 +12,11 @@
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Main application window showing multiple toolboxes</caption>
|
||||
<image type="source" width="1200" height="800">https://media.githubusercontent.com/media/13hannes11/toolbox-tuner/main/data/resources/screenshots/main_light.png</image>
|
||||
<image type="source" width="900" height="600">https://media.githubusercontent.com/media/13hannes11/toolbox-tuner/main/data/resources/screenshots/main_light.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<caption>Main application window in dark mode</caption>
|
||||
<image type="source" width="1200" height="800">https://github.com/13hannes11/toolbox-tuner/blob/main/data/resources/screenshots/main_dark.png</image>
|
||||
<image type="source" width="900" height="600">https://github.com/13hannes11/toolbox-tuner/blob/main/data/resources/screenshots/main_dark.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<branding>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -42,6 +42,10 @@ if get_option('profile') == 'development'
|
||||
version_suffix = '-@0@'.format(vcs_tag)
|
||||
endif
|
||||
application_id = '@0@.@1@'.format(base_id, profile)
|
||||
elif get_option('profile') == 'screenshot'
|
||||
profile = 'Screenshot'
|
||||
version_suffix = ''
|
||||
application_id = base_id
|
||||
else
|
||||
profile = ''
|
||||
version_suffix = ''
|
||||
|
||||
@@ -3,7 +3,8 @@ option(
|
||||
type: 'combo',
|
||||
choices: [
|
||||
'default',
|
||||
'development'
|
||||
'development',
|
||||
'screenshot',
|
||||
],
|
||||
value: 'default',
|
||||
description: 'The build profile for Toolbox Tuner. One of "default" or "development".'
|
||||
|
||||
@@ -262,17 +262,23 @@ impl AppWidgets {
|
||||
let settings = gio::Settings::new(APP_ID);
|
||||
let (width, height) = self.main_window.default_size();
|
||||
|
||||
if PROFILE != "Screenshot" {
|
||||
settings.set_int("window-width", width)?;
|
||||
settings.set_int("window-height", height)?;
|
||||
|
||||
settings.set_boolean("is-maximized", self.main_window.is_maximized())?;
|
||||
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn load_window_size(&self) {
|
||||
let settings = gio::Settings::new(APP_ID);
|
||||
|
||||
if PROFILE == "Screenshot" {
|
||||
self.main_window.set_default_size(778, 478);
|
||||
return;
|
||||
}
|
||||
|
||||
let width = settings.int("window-width");
|
||||
let height = settings.int("window-height");
|
||||
let is_maximized = settings.boolean("is-maximized");
|
||||
|
||||
Reference in New Issue
Block a user