poc window decorations

This commit is contained in:
galister
2026-01-03 20:57:14 +09:00
parent 57c450cb45
commit b6c16dff18
12 changed files with 178 additions and 36 deletions
+6 -1
View File
@@ -10,8 +10,8 @@ use crate::{
globals::Globals,
layout::Widget,
renderer_vk::text::{
TextShadow,
custom_glyph::{CustomGlyph, CustomGlyphData},
TextShadow,
},
stack::{self, ScissorBoundary, ScissorStack, TransformStack},
widget::{self, ScrollbarInfo, WidgetState},
@@ -147,6 +147,11 @@ impl Color {
let a = (self.a.clamp(0.0, 1.0) * 255.0).round() as u8;
format!("#{r:02X}{g:02X}{b:02X}{a:02X}")
}
#[must_use]
pub fn as_arr(&self) -> [f32; 4] {
[self.r, self.b, self.g, self.a]
}
}
impl Default for Color {