class OnTrackWorkspace : Workspace() { init { wrapper { borderpane { root.header.items.add(0, Label("OnTrack").addClass(Styles.appTitle)) center = root left { listmenu { paddingTop = 50 theme = "blue" orientation = Orientation.VERTICAL useMaxHeight = true item(graphic = Styles.taskIcon(), tag = "Tasks") { activeItem = this dockOnSelect() } item(graphic = Styles.kanbanIcon(), tag = "Kanban").dockOnSelect() item(graphic = Styles.calendarIcon(), tag = "calendar") item(graphic = Styles.statsIcon(), tag = "Stats") item(graphic = Styles.integrationsIcon(), tag = "Integrations").dockOnSelect() item(graphic = Styles.settingsIcon(), tag = "Settings").dockOnSelect() } } } } } inline fun ListMenuItem.dockOnSelect() { whenSelected { dock() } } }