From 3297c4eb70c38e2bf502c93601a454856c0fc1a0 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Thu, 26 May 2022 13:27:58 +0200 Subject: [PATCH] Add format explanation to eww open position and size docs --- crates/eww/src/opts.rs | 4 ++-- crates/eww/src/widgets/widget_definitions.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/eww/src/opts.rs b/crates/eww/src/opts.rs index 8bef97b..10dbc1f 100644 --- a/crates/eww/src/opts.rs +++ b/crates/eww/src/opts.rs @@ -95,11 +95,11 @@ pub enum ActionWithServer { #[structopt(long)] screen: Option, - /// The position of the window, where it should open. + /// The position of the window, where it should open. (i.e.: 200x100) #[structopt(short, long)] pos: Option, - /// The size of the window to open + /// The size of the window to open (i.e.: 200x100) #[structopt(short, long)] size: Option, diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widgets/widget_definitions.rs index 42ab0b6..3dd9885 100644 --- a/crates/eww/src/widgets/widget_definitions.rs +++ b/crates/eww/src/widgets/widget_definitions.rs @@ -158,6 +158,7 @@ pub(super) fn resolve_widget_attrs(bargs: &mut BuilderArgs, gtk_widget: >k::Wi def_widget!(bargs, _g, gtk_widget, { // @prop class - css class name prop(class: as_string) { + // TODO currently this overrides classes that gtk adds automatically, which is kinda stupid... let old_classes = gtk_widget.style_context().list_classes(); let old_classes = old_classes.iter().map(|x| x.as_str()).collect::>(); let new_classes = class.split(' ').collect::>();