Split info draw into methods
This commit is contained in:
parent
e60e0a353f
commit
460427e6f6
1 changed files with 7 additions and 0 deletions
|
@ -8,6 +8,11 @@ module Widgets
|
|||
private
|
||||
|
||||
def draw
|
||||
draw_main_line
|
||||
draw_public_key
|
||||
end
|
||||
|
||||
def draw_main_line
|
||||
setpos 0, 0
|
||||
|
||||
case props[:status]
|
||||
|
@ -33,7 +38,9 @@ module Widgets
|
|||
end
|
||||
addstr ' : '
|
||||
addstr props[:status_message]
|
||||
end
|
||||
|
||||
def draw_public_key
|
||||
setpos 0, 1
|
||||
addstr PUBLIC_KEY_LABEL
|
||||
if PUBLIC_KEY_LABEL.length + props[:public_key].length > props[:width]
|
||||
|
|
Reference in a new issue