mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-07 08:38:46 +00:00
fix: don't crash if missing adwaita-dark gtksourceview5 style
This commit is contained in:
parent
9f1e2edb98
commit
e56613e8e5
1 changed files with 4 additions and 5 deletions
|
@ -241,12 +241,11 @@ impl SimpleComponent for DebugView {
|
|||
) -> ComponentParts<Self> {
|
||||
let textbuf = sourceview5::Buffer::builder()
|
||||
.highlight_syntax(false)
|
||||
.style_scheme(
|
||||
&sourceview5::StyleSchemeManager::new()
|
||||
.scheme("Adwaita-dark")
|
||||
.expect("Couldn't find Adwaita-dark style scheme for gtksourceview5"),
|
||||
)
|
||||
.build();
|
||||
match &sourceview5::StyleSchemeManager::new().scheme("Adwaita-dark") {
|
||||
Some(scheme) => textbuf.set_style_scheme(Some(scheme)),
|
||||
None => {}
|
||||
}
|
||||
let search_settings = sourceview5::SearchSettings::builder()
|
||||
.wrap_around(true)
|
||||
.case_sensitive(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue