Skip to content

Commit

Permalink
Do not set font style in code
Browse files Browse the repository at this point in the history
Style should be set only via CSS stylesheet to allow
customization.

Signed-off-by: Stefano Babic <[email protected]>
  • Loading branch information
sbabic committed Sep 19, 2018
1 parent 82b9a30 commit dc39f95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
13 changes: 4 additions & 9 deletions SWUpdateGUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function updnetinterfaces()
Text = t["name"] .. ": " .. t["addr"] .. " " .. t["netmask"],
HAlign = "left",
Height = "auto",
Style = "font: ui-xx-large/bi; text-align:left"
Style = "text-align:left"
}
elem = app:getById("net-" .. t["name"])
if elem then
Expand Down Expand Up @@ -523,16 +523,14 @@ app = ui.Application:new

if status == STATUS_RUN then
g:setValue("Text", L.UPDATE_IN_PROGRESS)
g:setValue("Style", "font: ui-xx-large/bi;")
elseif status == STATUS_FAILURE then
g:setValue("Text", L.FAILURE)
g:setValue("Style", "font: ui-xx-large/bi; color: #ff0000;")
g:setValue("Style", "color: #ff0000;")
elseif status == STATUS_SUCCESS then
g:setValue("Text", L.SUCCESS)
g:setValue("Style", "font: ui-xx-large/bi; color: #00ff00;")
g:setValue("Style", "color: #00ff00;")
elseif status == STATUS_START then
g:setValue("Text", L.STARTING_UPDATE)
g:setValue("Style", "font: ui-xx-large/bi;")
else

end
Expand Down Expand Up @@ -566,7 +564,6 @@ app = ui.Application:new
VAlign = "center",
Height = "auto",
InitialFocus = true,
Style = "font: ui-xx-large/bi;",

onClick = function(self)
local app = self.Application
Expand Down Expand Up @@ -598,7 +595,6 @@ app = ui.Application:new
VAlign = "center",
Width = "fill",
Height = "auto",
Style = "font: ui-xx-large/bi;",
onClick = function(self)
app:switchwindow("MainWindow", "network-window")
end,
Expand All @@ -610,7 +606,6 @@ app = ui.Application:new
HAlign = "center",
Width = "fill",
Height = "auto",
Style = "font: ui-xx-large/bi;",
onClick = function(self)
if not NOREBOOT then
os.execute ("/sbin/reboot")
Expand Down Expand Up @@ -678,4 +673,4 @@ app:run()
progtask:terminate()

app:hide()
app:cleanup()
app:cleanup()
5 changes: 2 additions & 3 deletions common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ function RescueGUIHeader.new(class, self)
self.title = ui.Text:new
{
Text = self.Description or "",
Style = "font: ui-xx-large/bi;"
}

self.logo = ui.ImageWidget:new
{
Width = "fill",
Height = "100",
Height = "fill",
Mode = "inert",
Image = self.Image,
HAlign = "center",
Expand All @@ -35,4 +34,4 @@ function RescueGUIHeader.new(class, self)
grp:addMember(self.logo)

return grp
end
end

0 comments on commit dc39f95

Please sign in to comment.