mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-09-15 22:31:52 +02:00
feat(bar): add komorebi widget (+config) and themes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::widget::BarWidget;
|
||||
use eframe::egui::Context;
|
||||
use eframe::egui::Label;
|
||||
use eframe::egui::Sense;
|
||||
use eframe::egui::Ui;
|
||||
@@ -46,14 +47,16 @@ pub struct Time {
|
||||
pub format: TimeFormat,
|
||||
}
|
||||
|
||||
impl BarWidget for Time {
|
||||
impl Time {
|
||||
fn output(&mut self) -> Vec<String> {
|
||||
vec![chrono::Local::now()
|
||||
.format(&self.format.fmt_string())
|
||||
.to_string()]
|
||||
}
|
||||
}
|
||||
|
||||
fn render(&mut self, ui: &mut Ui) {
|
||||
impl BarWidget for Time {
|
||||
fn render(&mut self, _ctx: &Context, ui: &mut Ui) {
|
||||
if self.enable {
|
||||
for output in self.output() {
|
||||
if ui
|
||||
|
||||
Reference in New Issue
Block a user