Add format explanation to eww open position and size docs
This commit is contained in:
parent
77adfbca6b
commit
3297c4eb70
2 changed files with 3 additions and 2 deletions
|
@ -95,11 +95,11 @@ pub enum ActionWithServer {
|
||||||
#[structopt(long)]
|
#[structopt(long)]
|
||||||
screen: Option<i32>,
|
screen: Option<i32>,
|
||||||
|
|
||||||
/// The position of the window, where it should open.
|
/// The position of the window, where it should open. (i.e.: 200x100)
|
||||||
#[structopt(short, long)]
|
#[structopt(short, long)]
|
||||||
pos: Option<Coords>,
|
pos: Option<Coords>,
|
||||||
|
|
||||||
/// The size of the window to open
|
/// The size of the window to open (i.e.: 200x100)
|
||||||
#[structopt(short, long)]
|
#[structopt(short, long)]
|
||||||
size: Option<Coords>,
|
size: Option<Coords>,
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,7 @@ pub(super) fn resolve_widget_attrs(bargs: &mut BuilderArgs, gtk_widget: >k::Wi
|
||||||
def_widget!(bargs, _g, gtk_widget, {
|
def_widget!(bargs, _g, gtk_widget, {
|
||||||
// @prop class - css class name
|
// @prop class - css class name
|
||||||
prop(class: as_string) {
|
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 = gtk_widget.style_context().list_classes();
|
||||||
let old_classes = old_classes.iter().map(|x| x.as_str()).collect::<Vec<&str>>();
|
let old_classes = old_classes.iter().map(|x| x.as_str()).collect::<Vec<&str>>();
|
||||||
let new_classes = class.split(' ').collect::<Vec<_>>();
|
let new_classes = class.split(' ').collect::<Vec<_>>();
|
||||||
|
|
Loading…
Add table
Reference in a new issue