mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 22:58:34 +01:00
fix(bar): calculate margin correctly
This commit is contained in:
1 parent
75373c2174
commit
f5a979d4b4
4 files changed
+7
-2
No files matched your search
@@ -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(
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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(),
|
||||
},
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
Reference in new issue
Block a user