fix(bar): calculate margin correctly

This commit is contained in:
LGUG2Z committed 2025-10-01 13:55:42 -07:00
1 parent 75373c2174
commit f5a979d4b4
4 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -793,8 +793,8 @@ impl Komobar {
pub fn position_bar(&self, ctx: &Context) {
ctx.send_viewport_cmd(ViewportCommand::OuterPosition(Pos2::new(
self.size_rect.top as f32,
self.size_rect.left as f32,
self.size_rect.top as f32,
)));
ctx.send_viewport_cmd(ViewportCommand::InnerSize(Vec2::new(
+1
View File
@@ -247,6 +247,7 @@ fn main() -> eyre::Result<()> {
let viewport_builder = ViewportBuilder::default()
.with_decorations(false)
.with_transparent(true)
.with_has_shadow(false)
.with_taskbar(false);
let native_options = eframe::NativeOptions {
+1 -1
View File
@@ -198,7 +198,7 @@ impl BarWidget for Date {
let mut layout_job = LayoutJob::simple(
match self.label_prefix {
LabelPrefix::Icon | LabelPrefix::IconAndText => {
egui_phosphor::regular::CALENDAR_DOTS.to_string()
egui_phosphor::regular::CALENDAR.to_string()
}
LabelPrefix::None | LabelPrefix::Text => String::new(),
},
+4
View File
@@ -1254,6 +1254,8 @@ fn main() -> eyre::Result<()> {
std::fs::create_dir_all(data_dir)?;
let mut komorebi_json = include_str!("../../docs/komorebi.example.json").to_string();
let komorebi_bar_json =
include_str!("../../docs/komorebi.bar.example.json").to_string();
if std::env::var("KOMOREBI_CONFIG_HOME").is_ok() {
komorebi_json =
@@ -1261,12 +1263,14 @@ fn main() -> eyre::Result<()> {
}
let komorebi_path = HOME_DIR.join("komorebi.json");
let bar_path = HOME_DIR.join("komorebi.bar.json");
let applications_path = HOME_DIR.join("applications.json");
let skhdrc_path = HOME_DIR.join("skhdrc");
let mut written_files = Vec::new();
write_file_with_prompt(&komorebi_path, &komorebi_json, &mut written_files)?;
write_file_with_prompt(&bar_path, &komorebi_bar_json, &mut written_files)?;
let applications_json = include_str!("../applications.json");
write_file_with_prompt(&applications_path, applications_json, &mut written_files)?;