A desktop backup program focusing on ease-of-use and simplicity, as well as quality, low resource usage, and performance.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
EZ-Bkup/views/app_menu_button.nim

42 lines
1.3 KiB

#[Copyright 2023 ITwrx.
This file is part of EZ-Bkup.
EZ-Bkup is released under the General Public License 3.0.
See COPYING or <https://www.gnu.org/licenses/> for details.]#
import owlkettle
import ../models/routine
viewable AppMenuButton:
## A button that opens the main menu of the application
routineModel: RoutineModel
method view(button: AppMenuButtonState): Widget =
result = gui:
MenuButton:
icon = "open-menu-symbolic"
# A menu is created using the PopoverMenu widget.
# It allows us to create menus & submenus.
PopoverMenu:
Box:
orient = OrientY
Box(orient = OrientX, spacing=6, margin=6) {.expand: true.}:
Button:
icon = "help-about-symbolic"
style = [ButtonSuggested]
proc clicked() =
discard button.app.open: gui:
AboutDialog:
programName = "EZ-Bkup"
logo = "ez_bkup"
style = [StyleClass("about-dialog")]
version = "0.9.11"
credits = @{
"Created:": @["https://ITwrx.org"],
"Src:": @["GPLv3"]
}
Label:
text = "About EZ-Bkup"
export AppMenuButton