Improve theming

Default to a dark theme and draw a grid on the background of the graphview
This commit is contained in:
Tom A. Wagner
2021-01-05 11:24:49 +01:00
parent 2897543acf
commit 9262308d28
2 changed files with 36 additions and 11 deletions

View File

@@ -28,11 +28,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Continue(true)
});
let app = gtk::Application::new(
Some("org.freedesktop.pipewire.graphui"),
Default::default()
)
.expect("Application creation failed");
let app = gtk::Application::new(Some("org.freedesktop.pipewire.graphui"), Default::default())
.expect("Application creation failed");
app.connect_activate(move |app| {
let window = gtk::ApplicationWindowBuilder::new()
@@ -42,6 +39,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.title("Pipewire Graph Editor")
.child(&*graphview.borrow())
.build();
window
.get_settings()
.set_property_gtk_application_prefer_dark_theme(true);
window.show();
});