summaryrefslogtreecommitdiff
path: root/translate-widget
diff options
context:
space:
mode:
authorpmakhov <pavel.makhov@savoirfairelinux.com>2017-12-04 17:36:14 -0500
committerpmakhov <pavel.makhov@savoirfairelinux.com>2017-12-04 17:36:14 -0500
commitc2d601aab49682e4c12b7ab68ad885f182b3b3ff (patch)
tree4819d51a98d2df1903f82ed333946234140edaad /translate-widget
parent3c19b57643c455931add2e4613f873a38dd8794e (diff)
improvements
Diffstat (limited to 'translate-widget')
-rw-r--r--translate-widget/translate.lua22
1 files changed, 7 insertions, 15 deletions
diff --git a/translate-widget/translate.lua b/translate-widget/translate.lua
index 0f1cbb3..10179db 100644
--- a/translate-widget/translate.lua
+++ b/translate-widget/translate.lua
@@ -27,40 +27,31 @@ local function urlencode(str)
end
local translate_widget_txt = wibox.widget {
--- align = 'center',
layout = wibox.layout.flex.vertical
}
local lang_wdgt = wibox.widget{
widget = wibox.widget.textbox,
--- align = 'center',
--- valign = 'center'
}
local to_translate_wdgt = wibox.widget{
widget = wibox.widget.textbox,
--- align = 'center',
--- valign = 'center'
}
local translation_wdgt = wibox.widget{
widget = wibox.widget.textbox,
--- align = 'center',
--- valign = 'center',
- wrap = 'word_char',
}
translate_widget_txt:add(lang_wdgt)
translate_widget_txt:add(to_translate_wdgt)
translate_widget_txt:add(translation_wdgt)
-local image = wibox.widget {
- image = '/usr/share/icons/Papirus-Dark/48x48/apps/gnome-translate.svg',
- resize = false,
- widget = wibox.widget.imagebox
-}
local translate_widget = wibox.widget {
- image,
+ {
+ image = '/usr/share/icons/Papirus-Dark/48x48/apps/gnome-translate.svg',
+ resize = false,
+ widget = wibox.widget.imagebox
+ },
translate_widget_txt,
layout = wibox.layout.fixed.horizontal
}
@@ -80,10 +71,11 @@ local function translate(request_string)
local w = wibox {
width = 300,
- height = 50,
+ height = 80,
ontop = true,
screen = mouse.screen,
expand = true,
+ strategy = 'min',
widget = translate_widget
}
awful.placement.top(w, { margins = {top = 25}})