Fix panic when loading bad text in the GUI.
This commit is contained in:
@@ -36,6 +36,7 @@ pub mod qobject {
|
||||
#[qproperty(QColor, explorer_background)]
|
||||
#[qproperty(QColor, explorer_folder)]
|
||||
#[qproperty(QColor, explorer_folder_open)]
|
||||
#[qproperty(QColor, terminal_background)]
|
||||
type RustColors = super::RustColorsImpl;
|
||||
}
|
||||
}
|
||||
@@ -65,6 +66,7 @@ pub struct RustColorsImpl {
|
||||
explorer_background: QColor,
|
||||
explorer_folder: QColor,
|
||||
explorer_folder_open: QColor,
|
||||
terminal_background: QColor,
|
||||
}
|
||||
|
||||
impl Default for RustColorsImpl {
|
||||
@@ -87,11 +89,12 @@ impl Default for RustColorsImpl {
|
||||
editor_highlight: QColor::try_from("#ccced3").unwrap(),
|
||||
gutter: QColor::try_from("#1e1f22").unwrap(),
|
||||
explorer_hovered: QColor::try_from("#4c5053").unwrap(),
|
||||
explorer_text: QColor::try_from("#3b3b3b").unwrap(),
|
||||
explorer_text: QColor::try_from("#FFF").unwrap(),
|
||||
explorer_text_selected: QColor::try_from("#262626").unwrap(),
|
||||
explorer_background: QColor::try_from("#1E1F22").unwrap(),
|
||||
explorer_folder: QColor::try_from("#54585b").unwrap(),
|
||||
explorer_folder_open: QColor::try_from("#2b2b2b").unwrap(),
|
||||
terminal_background: QColor::try_from("#2C2E32").unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user