fix: more text widgets unicode-capable now
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use iced::widget::{button, column, container, row, scrollable, text, Space};
|
||||
use iced::widget::text::Shaping;
|
||||
use iced::{Alignment, Background, Border, Color, Element, Length, Theme};
|
||||
|
||||
use bds_core::i18n::UiLocale;
|
||||
@@ -70,17 +71,17 @@ pub fn view(
|
||||
let muted = Color::from_rgb(0.50, 0.50, 0.55);
|
||||
|
||||
// Tab header
|
||||
let tasks_btn = button(text(t(locale, "common.tasks")).size(12))
|
||||
let tasks_btn = button(text(t(locale, "common.tasks")).size(12).shaping(Shaping::Advanced))
|
||||
.on_press(Message::SetPanelTab(PanelTab::Tasks))
|
||||
.padding([4, 8])
|
||||
.style(if panel_tab == PanelTab::Tasks { tab_active } else { tab_inactive });
|
||||
|
||||
let output_btn = button(text(t(locale, "panel.output")).size(12))
|
||||
let output_btn = button(text(t(locale, "panel.output")).size(12).shaping(Shaping::Advanced))
|
||||
.on_press(Message::SetPanelTab(PanelTab::Output))
|
||||
.padding([4, 8])
|
||||
.style(if panel_tab == PanelTab::Output { tab_active } else { tab_inactive });
|
||||
|
||||
let close_btn = button(text("\u{2715}").size(12))
|
||||
let close_btn = button(text("\u{2715}").size(12).shaping(Shaping::Advanced))
|
||||
.on_press(Message::TogglePanel)
|
||||
.padding([4, 6])
|
||||
.style(close_btn_style);
|
||||
@@ -99,7 +100,7 @@ pub fn view(
|
||||
let content: Element<'static, Message> = match panel_tab {
|
||||
PanelTab::Tasks => {
|
||||
if task_snapshots.is_empty() {
|
||||
container(text(t(locale, "tasks.noActive")).size(12).color(muted))
|
||||
container(text(t(locale, "tasks.noActive")).size(12).shaping(Shaping::Advanced).color(muted))
|
||||
.padding(8)
|
||||
.into()
|
||||
} else {
|
||||
@@ -120,7 +121,7 @@ pub fn view(
|
||||
progress_str,
|
||||
phase_str,
|
||||
);
|
||||
text(status_text).size(11).color(Color::from_rgb(0.70, 0.70, 0.75)).into()
|
||||
text(status_text).size(11).shaping(Shaping::Advanced).color(Color::from_rgb(0.70, 0.70, 0.75)).into()
|
||||
})
|
||||
.collect();
|
||||
scrollable(
|
||||
@@ -133,7 +134,7 @@ pub fn view(
|
||||
}
|
||||
PanelTab::Output => {
|
||||
if output_entries.is_empty() {
|
||||
container(text(t(locale, "panel.noOutput")).size(12).color(muted))
|
||||
container(text(t(locale, "panel.noOutput")).size(12).shaping(Shaping::Advanced).color(muted))
|
||||
.padding(8)
|
||||
.into()
|
||||
} else {
|
||||
@@ -142,6 +143,7 @@ pub fn view(
|
||||
.map(|entry| {
|
||||
text(entry.text.clone())
|
||||
.size(11)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(Color::from_rgb(0.70, 0.70, 0.75))
|
||||
.into()
|
||||
})
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use iced::widget::{button, container, row, svg, text, Column, Space};
|
||||
use iced::widget::text::Shaping;
|
||||
use iced::{Background, Border, Color, Element, Length, Theme};
|
||||
|
||||
use bds_core::i18n::UiLocale;
|
||||
@@ -103,6 +104,7 @@ pub fn view(
|
||||
let header = container(
|
||||
text(t(locale, "projectSelector.projectsHeader"))
|
||||
.size(11)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(Color::from_rgb(0.55, 0.55, 0.60)),
|
||||
)
|
||||
.padding([4, 8])
|
||||
@@ -118,14 +120,14 @@ pub fn view(
|
||||
|
||||
let label = if is_active {
|
||||
row![
|
||||
text("\u{2713}").size(12).color(Color::from_rgb(0.40, 0.80, 0.40)),
|
||||
text(name).size(12).color(Color::WHITE),
|
||||
text("\u{2713}").size(12).shaping(Shaping::Advanced).color(Color::from_rgb(0.40, 0.80, 0.40)),
|
||||
text(name).size(12).shaping(Shaping::Advanced).color(Color::WHITE),
|
||||
]
|
||||
.spacing(6)
|
||||
} else {
|
||||
row![
|
||||
Space::with_width(Length::Fixed(14.0)),
|
||||
text(name).size(12).color(Color::from_rgb(0.80, 0.80, 0.85)),
|
||||
text(name).size(12).shaping(Shaping::Advanced).color(Color::from_rgb(0.80, 0.80, 0.85)),
|
||||
]
|
||||
.spacing(6)
|
||||
};
|
||||
@@ -157,8 +159,8 @@ pub fn view(
|
||||
items.push(
|
||||
button(
|
||||
row![
|
||||
text("+").size(14).color(Color::from_rgb(0.55, 0.75, 0.95)),
|
||||
text(t(locale, "projectSelector.newProject")).size(12),
|
||||
text("+").size(14).shaping(Shaping::Advanced).color(Color::from_rgb(0.55, 0.75, 0.95)),
|
||||
text(t(locale, "projectSelector.newProject")).size(12).shaping(Shaping::Advanced),
|
||||
]
|
||||
.spacing(6),
|
||||
)
|
||||
@@ -208,10 +210,12 @@ pub fn trigger_button(project_name: &str) -> Element<'static, Message> {
|
||||
|
||||
let name = text(project_name.to_string())
|
||||
.size(12)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(Color::from_rgb(0.80, 0.80, 0.85));
|
||||
|
||||
let chevron = text("\u{25BE}")
|
||||
.size(10)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(Color::from_rgb(0.55, 0.55, 0.60));
|
||||
|
||||
button(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use iced::widget::{button, column, container, scrollable, text, Space};
|
||||
use iced::widget::text::Shaping;
|
||||
use iced::{Background, Border, Color, Element, Length, Theme};
|
||||
|
||||
use bds_core::i18n::UiLocale;
|
||||
@@ -62,6 +63,7 @@ pub fn view(
|
||||
|
||||
let header = text(header_text)
|
||||
.size(13)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(Color::from_rgb(0.85, 0.85, 0.90));
|
||||
|
||||
let body: Element<'static, Message> = match sidebar_view {
|
||||
@@ -69,6 +71,7 @@ pub fn view(
|
||||
if posts.is_empty() {
|
||||
text(t(locale, placeholder_key(sidebar_view)))
|
||||
.size(12)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(muted)
|
||||
.into()
|
||||
} else {
|
||||
@@ -81,7 +84,7 @@ pub fn view(
|
||||
bds_core::model::PostStatus::Archived => "\u{25A1} ", // □
|
||||
};
|
||||
let label = format!("{status_indicator}{}", p.title);
|
||||
button(text(label).size(12))
|
||||
button(text(label).size(12).shaping(Shaping::Advanced))
|
||||
.on_press(Message::OpenTab(Tab {
|
||||
id: p.id.clone(),
|
||||
tab_type: TabType::Post,
|
||||
@@ -102,6 +105,7 @@ pub fn view(
|
||||
_ => {
|
||||
text(t(locale, placeholder_key(sidebar_view)))
|
||||
.size(12)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(muted)
|
||||
.into()
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ pub fn view(
|
||||
} else {
|
||||
format!("{phase_str}{progress_str}{extra}")
|
||||
};
|
||||
text(display).size(11).color(label_color).into()
|
||||
text(display).size(11).shaping(Shaping::Advanced).color(label_color).into()
|
||||
} else {
|
||||
Space::with_width(0).into()
|
||||
};
|
||||
@@ -180,11 +180,11 @@ pub fn view(
|
||||
.style(dropdown_trigger);
|
||||
|
||||
let right = row![
|
||||
text(posts_label).size(11).color(label_color),
|
||||
text(media_label).size(11).color(label_color),
|
||||
text(posts_label).size(11).shaping(Shaping::Advanced).color(label_color),
|
||||
text(media_label).size(11).shaping(Shaping::Advanced).color(label_color),
|
||||
airplane_btn,
|
||||
locale_trigger,
|
||||
text("bDS").size(11).color(Color::from_rgb(0.45, 0.45, 0.50)),
|
||||
text("bDS").size(11).shaping(Shaping::Advanced).color(Color::from_rgb(0.45, 0.45, 0.50)),
|
||||
]
|
||||
.spacing(8)
|
||||
.align_y(Alignment::Center);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use iced::widget::{button, container, row, text, Space};
|
||||
use iced::widget::text::Shaping;
|
||||
use iced::{Background, Border, Color, Element, Length, Theme};
|
||||
|
||||
use crate::app::Message;
|
||||
@@ -88,8 +89,8 @@ pub fn view(
|
||||
let close_id = tab.id.clone();
|
||||
|
||||
let label = row![
|
||||
text(title_text).size(12),
|
||||
button(text("\u{2715}").size(10))
|
||||
text(title_text).size(12).shaping(Shaping::Advanced),
|
||||
button(text("\u{2715}").size(10).shaping(Shaping::Advanced))
|
||||
.on_press(Message::CloseTab(close_id))
|
||||
.padding(2)
|
||||
.style(close_style),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use iced::widget::{column, container, text};
|
||||
use iced::widget::text::Shaping;
|
||||
use iced::{Background, Color, Element, Length, Theme};
|
||||
|
||||
use bds_core::i18n::UiLocale;
|
||||
@@ -14,9 +15,11 @@ pub fn view(locale: UiLocale) -> Element<'static, Message> {
|
||||
column![
|
||||
text(title)
|
||||
.size(28)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(Color::from_rgb(0.85, 0.85, 0.90)),
|
||||
text(subtitle)
|
||||
.size(14)
|
||||
.shaping(Shaping::Advanced)
|
||||
.color(Color::from_rgb(0.55, 0.55, 0.60)),
|
||||
]
|
||||
.spacing(12)
|
||||
|
||||
Reference in New Issue
Block a user