For example, the rightmost pixel of a border-less graph wasn't draw and all
drawing was shifted one pixel to the left.
Signed-off-by: Uli Schlachter <psychon@znc.in>
behavior before: draw fg color everywhere and draw each value inverted as bg color.
if not enough values available "remove" the free area (draw a big rectangle with bg color over it).
behavior now: draw each value onto background as fg stroke.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When something sends notifications which don't get mapped into some preset,
args.preset would be nil and indexing nil throws a lua error. Fix this by using
the default preset in that case.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The cairo bindings are quite new in lgi and thus we depend on a quite new
version of lgi. Older versions will fail with lots of weird errors, e.g.:
lib/gears/color.lua:61:attempt to call field 'create_rgba' (a nil value)
Signed-off-by: Uli Schlachter <psychon@znc.in>
Commit d14d6959ea caused every notify() call to fail with 'attempt to
compare number with nil' because the default_preset table no longer exists.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Many themes have prerendered icons of different sizes stored in
subdirectories named as '<size>x<size>'. By looking in these directories
when a specific icon size is specified, we can support themes in a
rather straightforward way.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Build the preset values by merging the default preset with the one
actually specified, falling back to the normal preset if no preset is
specified.
This allows changing the position/font/whatever of all notification by
only setting up the default preset value (modulo overrides in the other
presets), instead of having to manually set it in all presets.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of creating unused cairo image surfaces, we create our temporary layouts
now via the (PangoCairo) font map. Way less ugly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds the documentation about keybindings for luadoc.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
For example, I have some lua code which sets the border width based on the
number of visible clients. When just a single client is visible, the border
width is 0, else it's what the theme says.
Previously, this caused visible "glitches" for fullscreen'd and maximized
clients. This patch fixes that and updates the client's geometry and
border width appropriately.
This has a slight chance of going into an endless loop if someone sets a
fullscreen'd clients border width from its property::border_width signal.
Just don't do that!
Thanks to Arvydas Sidorenko for finding this issue.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Patterns like
if condition then
return true
else
return false
end
could be simplified to
return condition
Signed-off-by: Felix <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds more navigation keybindings ('Home' and 'End'), which select
the first and the last entry from the list respectively. Also, it adds
two more keybindings:
'Ctrl+Enter' - Run the query (no need to press End and then
Enter)
'Ctrl+Alt+Enter' - Run query in the terminal (sometimes there are
terminal applications which one wants to run, e.g. ncmpcpp)
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
After some recent keygrabber changes the menubar's application
execution was broken. This commit fixes it.
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since we can search for commands in menubar and easily execute almost
any program now, we can definitely make use of awful.shell.completion,
which is enabled with this commit.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds a 'Exec: <your-cmd-here>' item to the end of the list,
which appears only if there is at least one application entry in
the list. This is useful, when the program is not in the list of menubar
entries (e.g. it does not have a .desktop file).
When there is are no matching application entries, the 'Exec: ' item is
silently removed, as we already have the same in the prompt.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Should ideally have been removed in commit 'drawin: Remove bg_color property'.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
In commit "awful.client.setslave: Fix for not-visible clients", I copied some
code from awful.client.visible(). However, I missed that I where supposed to
change something in the code that I had copied. Whoops.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, setslave() put a client only at the end of the list of visible
clients. Obviously this means that it didn't do anything helpful if the target
client was not visible.
Fix this by iterating over all clients on the target screen instead of just the
visible ones.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Enabling matching the command name of the menubar entries with the
query, which improves the flexibility of the widget. The functionality
works as follows:
You want to run GIMP, which has a name of "GNU Image Manipulation
Program". Previously by typing in gimp one would have <no matches>, but
now it will match GIMP entry.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
All of the capi should be in a capi table. This make the code more
consistent. Also, it is not worth importing awful.prompt as a different
variable as it is used only once. Calling it awful.prompt make the code
clearer as there are other variables called prompt.
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
this makes the use of cur_menu obsolete because now every menu and submenu gets its own keygrabber. there is no need anymore to track the latest opened menu globaly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
dump_raw function wasn't printing the plain (non-table) value if the
tag was not specified.
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
If you now set a wibox' background to e.g. "#00000080", the wibox will do fake
transparency and draw the wallpaper as its background.
This should cover 90% of uses of wibox transparency. For the remaining 10% I'll
wait for bug reports. :-)
Signed-off-by: Uli Schlachter <psychon@znc.in>
:lines() generator in parse_dir function was not used properly which
caused problems when using LuaJIT.
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit adds a new {bg,fg}_occupied option to the taglist. These control the
background and foreground color that unselected but occupied tags get in the
taglist. Occupied here means that at least one client is tagged with that tag.
Thanks to NougatRillettes for submitting this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The only caller of focus.history.add() should be the "focus" signal, so at that
time the unfocusable client already does have the focus. At that point, there is
no reason why this shouldn't be recorded in the focus history.
(And yes, unfocusable clients can be focused. Don't ask.)
This should hopefully fix FS#778.
Signed-off-by: Uli Schlachter <psychon@znc.in>
To avoid collision and confusion with other methods having the same name. So,
awful.client.cycle -> awful.client.iterate (renamed)
awful.util.table.cycle -> awful.util.table.iterate (renamed)
These methods were added in commit "add awful.client.cycle", and "add
awful.util.table.cycle".
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Menubar is a dmenu-like applications menu for Awesome
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
I simply moved out the code to 'jumpto' a client from
`awful.client.urgent.jumpto` into a separate function of its own so that it can
be reused.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
changed_callback allows to execute arbitrary code any time the
command string changes.
keypressed_callback allows to intercept keypresses before
awful.prompt.run code handles them and run arbitrary code depending on
the key pressed and modificators.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Returning true from the callback to `keygrabber` is no longer necessary to
continue grabbing the keyboard.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Returning true from the callback to `keygrabber` is no longer necessary to
continue grabbing the keyboard.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This was broken since 014d191f66 (which made this kind of stuff mandatory,
because 'return false' is ignored now). Whoops.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Fix this function so that it respects the recent changes in the ewmh.lua
code. It also incorporates some additional logic to respect the
border-width.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously we were not taking into account the border-width of the
client which we ought to as otherwise the client goes of the screen by
several pixels. It's slightly more ugly when we have several screens
connected.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes awful not to overwrite the saved geometry by just storing the
two geometries in separate places.
Signed-off-by: Uli Schlachter <psychon@znc.in>
I don't see why people would not want keyboard-enabled-menu by default.
Without it, you can't even use 'Escape' to quit the menu or press 'Enter' to
execute an entry. But instead of just enabling keyboard support by default, we
remove the option of disabling keyboard support altogether, which also
simplifies the implementation a bit.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The corresponding pattern factory that `string_pattern` delegates to is stored
in the `creator` parameter, and not `v`; probably a typo.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
add awful.client.cycle to iterate through clients that match a given condition
A common use case is to cycle through clients that match a given rule and take
certain action on them: raise, set or get property, etc.; see usage example in
the docs.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
add awful.util.table.cycle to iterate through elements that match given
condition
This will help writing concise code when one wants to apply a function to
(read, take some action) on a select list of elements in a table (of say,
clients and tags).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Replaced all references to image_surface_create_from_png to
awesome.load_image
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
So the utility of `awful.placement` is not merely limited to client objects,
but also to wiboxes.
[us: use appropriate naming convention; catch misplaced statement]
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Given an object's coordinates, `awful.screen.getbycoord` can be used to
determine the screen than the object is, or should be attached to.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The `screen` property on wibox (drawin) was removed in the commit - 'drawin:
Remove screen property'.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Luadoc confuses '<stop>' with an HTML tag otherwise.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
In general, patterns are specified as 'type:arguments', where 'arguments' is
specific to the pattern used. The example provided in the documentation,
defined the pattern type to be 'linear', but used arguments meant to create
radial pattern. So we modify the example to use the correct type -- 'radial'.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The documentation for these functions were hidden (intentionally?) from luadoc
because of misspelt @class and @name tags. Fixed the spelling, so luadoc can do
its job.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Symbols (or, visual hints) used to indicate that a client is: 'ontop' or
'floating' or 'maximized_horizontal' or 'maximized_vertical', can now be
defined in the theme, or passed to awful.widget.tasklist() as the last, 'style'
argument (see docs).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Most probably, the original author chose to use 'K' first, switched to
'myclock' later, and forgot to update remaining occurrences of 'K'.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The default background color (None) means that the server will leave the
window's content untouched when an exposure happens. This should get rid of all
cases of "flashing window".
The real background will later be drawn while awesome is handling the expose
event.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Before this commit, a submenu was border_width pixels lower than its parent menu
entry. Fix this by not adding the border_width to the submenu's position.
We still have to add the border_width to the parent menu's width so that the
border of the submenu entry doesn't overlap the content of its parent menu (the
borders of the two menus do overlap!).
Signed-off-by: Uli Schlachter <psychon@znc.in>
Initializing the client property "floating_geometry" on the
property::geometry signal is problematic since this is emitted before
client_set_border_width(), causing the internal client geometry to get
stored and later passed to client:geometry() which assumes it includes
titlebar and borders.
Signed-off-by: Corey Thompson <cmtptr@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
If the first argument to cycle must be > 1 or else return nil
immediately.
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
In the textbox' draw() callback we forgot to set the pango layout's width and
height. Whoops.
This was tested with the following code which makes it visible when the textbox
draws outside of its assigned space:
local w = wibox({ screen = 1 })
w.y = 10
w.x = 10
w.width = 150
w.height = 150
w.visible = true
local wi = wibox.widget.base.make_widget()
local t = wibox.widget.textbox()
t:set_markup("Foo <b>bar</b> <i>Foobar</i> und so weiter")
wi.draw = function(d, wibox, cr, width, height)
cr:move_to(24.5, 0)
cr:line_to(24.5, 150)
cr:move_to(0, 24.5)
cr:line_to(150, 24.5)
cr:move_to(124.5, 0)
cr:line_to(124.5, 150)
cr:move_to(0, 124.5)
cr:line_to(150, 124.5)
cr:set_line_width(1)
cr:stroke()
cr:translate(25, 25)
t.draw(t, wibox, cr, 100, 100)
end
w:set_widget(wi)
Signed-off-by: Uli Schlachter <psychon@znc.in>
Tagging sticky clients shouldn't hurt anything, but it helps a lot if the client
later becomes unsticky. I'd have no tags in that case.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of re-creating all the widgets for the list entries on each update, this
code now caches its widgets again and only creates new widgets when a new
client/tag appears.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:
#!/bin/ksh
git ls-tree -r HEAD | cut -f2 | while read f; do
egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
mv /tmp/foo $f
done
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Replacing a popup only worked when it wasn't the newest notification we had. Fix
this to also work if no new notification showed up in between.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of creating a pango layout all the time (e.g. twice per redraw), we now
only create a single layout which we keep around all the time and update as
needed. Hopefully this helps a little.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This handles corner case where a client has no tags (e.g. stickied), but
is moved across screens.
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Only do a tag.viewonly() if the urgent client is not visible.
Further, if the boolean 'merge' parameter is true [default false], then
to a tag.viewmore() with all the currently visible tags.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Let's just quote the bug report:
A regression was introduced in commit f5a5af4001
which causes wiboxes to position themselves incorrectly on Xinerama screens
besides the first one. In lib/awful/wibox.lua.in line 49, function
set_position(), the screen number used to use wibox.screen but now just defaults
to 1. Since the screen parameter is never actually passed to set_position(),
that means that wiboxes will always use screen 1's geometry when determining the
proper position. So, if a different screen is larger or smaller or isn't aligned
with the primary screen, the wibox will either be offscreen or not on the edge.
This should be fixed by explicitly passing the right screen argument to all
functions which need it.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Apparently some people start a timer, switch to an empty tag and then let the
timer move a client to that empty tag. This change makes sure that this new
client will get the input focus in this case.
Signed-off-by: Uli Schlachter <psychon@znc.in>
There is no point in keeping this font cache alive for longer than needed.
Letting lua garbage-collect fonts should provide sane cache-behavior in that we
forgot about the font once no one uses it anymore.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The menu was first made visible and then placed correctly. This caused a short,
black flicker in the top, left corner of the screen.
Fix this by removing a too early "visible = true".
This was introduced by me in 4d280365ad, sorry.
Signed-off-by: Uli Schlachter <psychon@znc.in>
So you want to make all Firefox windows floating except the main window
(instance = Navigator). You can either list all possible windows in
rules and make them floating, or make all of them floating except one:
{ rule = { class = "Firefox" },
except = { instance = "Navigator" },
properties = {floating = true},
}
More examples in the docs.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
When some client sets an invalid window title, a lua error was generated while
updating the tasklist. This caused all later tasklist entries to be skipped /
missing and the last entry to be empty.
Fix this by catching lua errors with pcall.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the imagebox widget refuse images which have a zero or negative width
or height. A zero size causes problems where a division by zero results in inf
which makes various stuff fail in weird ways later on.
Additionally, cairo's "error surfaces" have a negative size. Displaying those
would cause all sorts of weird problems, too, so we better reject those.
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.placement.no_overlap caused clients on an otherwise empty desktop to stich
to the top-left corner of the screen because it always preferred the top-left
corner of the available space.
This commit doesn't change the way in which the available area is computed, but
instead this now tries to keep the client at its original position if that is
available.
This fixes cases where calling awful.placement.no_overlap as a callback from an
awful.rule rule didn't work because the manage signal in the default config
later overrode that via calling awful.placement.no_overlap.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This corrects a type in awful.client.restore which caused it not to restore any
client at all if all clients are minimized.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This restores the first minimized client it finds on the selected tags.
Optionally, this function accepts a screen number as its first argument.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes a bug where the tasklist would still show its old content after a
client was minimized/unminized because it didn't connect to the appropriate
signal.
This wasn't noticed before, because in most cases minimizing a client also
unfocuses this client which causes a tasklist update.
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.client.floating.get() does some sensible defaults. E.g. dialogs are
floating by default. Since floating.toggle only checked the property, these
defaults made it break.
So floating.toggle() should use floating.get to decide if a given client is
floating. It should also use "false" instead of "nil" when the client is made
non-floating or else the default will apply again.
Thanks to vsp for making me figure this out. :)
Signed-off-by: Uli Schlachter <psychon@znc.in>
When some client on the left monitor was closed while client.focus is on the
right monitor (e.g. 'sleep 5 ; exit' in a terminal), awful.autofocus would shift
the input focus to whatever client happened to be next in the focus history on
the left monitor.
Fix this by only ever moving the input focus between screens when a tag is
selected, not when some client does its magic.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Added a very simple example to show the usage, and applicability of
awful.menu by dynamically constructing a menu of clients that match a
particular rule.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Display the possible keys to the 'menu' params as a bullet list
(unreadable otherwise).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
image:type() was removed from oocairo, because the ._NAME property already
exists and there's no need for two functions doing the same job.
Signed-off-by: Uli Schlachter <psychon@znc.in>
naughty now tries to ignore all pango markup by using :set_text() instead of
:set_markup(). If this fails, too, we must have been fed invalid utf8 which we
cannot do anything about.
Signed-off-by: Uli Schlachter <psychon@znc.in>
I removed textbox' check() function, but forgot to see if anything actually
calls it. Just removing the call fixes all problems here.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the textbox pass the markup/text it is given to oopango immediately.
If it is invalid, a lua error will be thrown and the old text will still be
shown.
This fixes a bug where the whole wibox isn't redrawn when a textbox complains
about broken UTF8.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The luadoc API documentation already contained this function and it seems to be
useful for user configs.
Signed-off-by: Uli Schlachter <psychon@znc.in>
setwfact() calls idx() on the client that it works on. When idx() is called with
a client that isn't visible, it fails while trying to find outs the client's
index in the current layout.
event_handle_mousegrabber:119: error running function:
lib/awful/client.lua:688: attempt to compare nil with number
Fix this by ignoring all clients that aren't visible in setwfact().
Signed-off-by: Uli Schlachter <psychon@znc.in>
If you managed to press mouse button 4 exactly between two entries in the
taglist, the taglist would jump by two tags instead of just one. This is because
the mouse event was forwarded to both taglist items.
This happened because the calculation in wibox' find_widgets() was wrong. If you
have a widget at (1, 1) with a size of 1x1, then (1, 1) is the only point that
this widget covers. However, the math also included the pixels (2, 1), (1, 2)
and (2, 2) in the widget's extents. This is obviously wrong.
Signed-off-by: Uli Schlachter <psychon@znc.in>
So far this only contains an "assert()" function, but I guess this could be
enhance. For example, a function which pretty-prints a table's contents might be
useful to have.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Added function to show only minimized clients in the taskbar for the
current tag.
Signed-off-by: Danny Navarro <j@dannynavarro.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, we used a timer with a timeout of 0 for redrawing the wibox. I had
the visual impression that the wibox was black for a moment. With strace I was
able to measure a latency of 10ms until the wibox was finally redrawn.
This now uses the "refresh" signal. With this, we get our latency down to
something like 0.15ms which sounds a lot better. :)
Signed-off-by: Uli Schlachter <psychon@znc.in>
Implementing vararg functions via arg is deprecated in lua. This kind of thing
should instead be done via "...".
Signed-off-by: Uli Schlachter <psychon@znc.in>
If set the prompt will execute the command upon completion which returns
only one match.
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes sure that textbox.text = "foo" doesn't work at all. It was never
supposed to work anyway. Sorry that I break stuff again.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of having to set the systray's base size by hand, it now automatically
uses min(avail_width, avail_height) as its base size. That's way less surprising
for people.
Signed-off-by: Uli Schlachter <psychon@znc.in>
By setting the textbox in an align layout's middle, the submenu icon will always
get the space it needs and the textbox will get the rest. Previously, the
textbox took as much as it wanted and the image got the rest. This looked ugly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If a widget has a width/height of 0, we can safely draw it without running out
of the available space. This code checks if we got enough space after we now how
much space the next widget wants.
This fixes the systray. It has to be drawn at least once so that the C core can
set up stuff correctly. However, thanks to the systray having a width of 0, it
wasn't drawn by the layout.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The icon should get the same background everything else gets. Fix this by making
the background the outer-most widget in each item.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We need a fixed layout here to make tag names like "media" work. Without this,
every take would get the same space, no matter how long its name is.
Signed-off-by: Uli Schlachter <psychon@znc.in>