tweak: return format! string directly

This commit is contained in:
Adil Hanney 2026-02-10 21:46:08 +00:00
parent 61486fae7d
commit 371cd1f542
No known key found for this signature in database

View file

@ -17,8 +17,6 @@ impl Theme {
/// Some high-level documentation for this file can be found at:
/// https://web.archive.org/web/20250402234329/https://docs.kde.org/stable5/en/plasma-workspace/kcontrol/colors/
pub fn as_qt(&self) -> String {
let mut output = "# GENERATED BY COSMIC\n".to_string();
// Usually, disabled elements will have strongly reduced contrast and are often notably darker or lighter
let disabled_color_effects = IniColorEffects {
color: self.button.disabled,
@ -120,8 +118,9 @@ impl Theme {
let light_or_dark = if self.is_dark { "Dark" } else { "Light" };
output.push_str(&format!(
r#"
format!(
r#"# GENERATED BY COSMIC
[ColorEffects:Disabled]
{}
@ -176,9 +175,7 @@ contrast=4
format_ini_colors(&view_colors, bg),
format_ini_colors(&window_colors, bg),
format_ini_wm_colors(&view_colors, self.is_dark),
));
output
)
}
/// Write the color scheme to the appropriate directory.