Correctly setup info icon for label

This commit is contained in:
hodasemi 2024-04-26 08:34:40 +02:00
parent 50cacf28bd
commit 36937a899e

View file

@ -183,6 +183,7 @@ impl Label {
self.framable.delete()?; self.framable.delete()?;
self.textable_wrapper.disable()?; self.textable_wrapper.disable()?;
self.info_icon.disable()?;
if let Some(background) = self.background.read().unwrap().as_ref() { if let Some(background) = self.background.read().unwrap().as_ref() {
background.disable()?; background.disable()?;
@ -219,6 +220,7 @@ impl Visibility for Label {
self.framable.add()?; self.framable.add()?;
self.textable_wrapper.enable()?; self.textable_wrapper.enable()?;
self.info_icon.enable()?;
if let Some(background) = self.background.read().unwrap().as_ref() { if let Some(background) = self.background.read().unwrap().as_ref() {
background.enable()?; background.enable()?;
@ -245,6 +247,7 @@ impl Gridable for Label {
self.framable.set_frame(x, y, w, h, vert_align, hori_align); self.framable.set_frame(x, y, w, h, vert_align, hori_align);
self.textable_wrapper.update()?; self.textable_wrapper.update()?;
self.info_icon.update_frame()?;
if let Some(background) = self.background.read().unwrap().as_ref() { if let Some(background) = self.background.read().unwrap().as_ref() {
background.update_frame()?; background.update_frame()?;
@ -264,6 +267,7 @@ impl Gridable for Label {
fn set_layer(&self, layer: i32) -> Result<()> { fn set_layer(&self, layer: i32) -> Result<()> {
self.framable.set_ui_layer(layer); self.framable.set_ui_layer(layer);
self.textable_wrapper.set_ui_layer(layer)?; self.textable_wrapper.set_ui_layer(layer)?;
self.info_icon.set_ui_layer(layer)?;
if let Some(background) = self.background.read().unwrap().as_ref() { if let Some(background) = self.background.read().unwrap().as_ref() {
background.set_ui_layer(layer); background.set_ui_layer(layer);