Skip to content

Commit

Permalink
separate ZScreenModal and Window, part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
TymurGubayev authored Oct 10, 2023
1 parent 07a9ccd commit bfa2892
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions gui/job-details.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ function JobDetails:init(args)
end
end

local window = widgets.Window{
frame_title='Details',
resizable = true,
resize_min={w=50, h=20},
frame = { l = 10, w = 50 },
}
window:addviews{
self:addviews{
widgets.Label{
frame = { l = 0, t = 0 },
text = {
Expand Down Expand Up @@ -92,14 +86,13 @@ function JobDetails:init(args)
frame = { l = 0, b = 0 },
text = {
{ key = 'LEAVESCREEN', text = ': Back',
on_activate = self:callback('dismiss')
-- on_activate = self:callback('dismiss')
}
}
},
}

self:addviews{window}
self.list = window.subviews.list
self.list = self.subviews.list

self:initListChoices()

Expand All @@ -108,7 +101,7 @@ function JobDetails:init(args)
+ 4 * #self.list.choices -- list body
+ 2 -- LEAVESCREEN
+ 2 -- window border
window.frame.h = h
self.frame.h = h
end

local function describe_item_type(iobj)
Expand Down

0 comments on commit bfa2892

Please sign in to comment.