ModuleListLabel < Label
  font: verdana-11px-monochrome
  background-color: alpha
  text-offset: 2 0
  focusable: true
  color: #cccccc

  $focus:
    color: #ffffff

  $on:
    background-color: #006600
  $!on:
    background-color: #660000

  $on focus:
    background-color: #004400
  $!on focus:
    background-color: #440000

ModuleInfoLabel < Label
  $!first:
    margin-top: 5
  margin-bottom: 2

ModuleValueLabel < UILabel
  font: verdana-11px-antialised
  color: #aaaaaa
  text-offset: 3 0
  image-source: /core_styles/styles/images/panel_flat.png
  image-border: 1
  height: 16

MainWindow
  id: moduleManagerWindow
  size: 480 450
  text: Module Manager

  @onEscape: ModuleManager.hide()

  TextList
    id: moduleList
    anchors.top: parent.top
    anchors.left: parent.left
    anchors.bottom: parent.bottom
    width: 180
    padding: 1
    focusable: false
    margin-bottom: 30

  Button
    id: refreshModulesButton
    anchors.top: moduleList.bottom
    anchors.left: moduleList.left
    margin-top: 8
    width: 80
    text: Refresh
    @onClick: ModuleManager.refreshModules()

  Button
    id: reloadAllModulesButton
    anchors.top: moduleList.bottom
    anchors.right: moduleList.right
    margin-top: 8
    width: 80
    text: Reload All
    @onClick: ModuleManager.reloadAllModules()

  Panel
    id: moduleInfo
    anchors.left: moduleList.right
    anchors.top: parent.top
    anchors.right: parent.right
    margin: 0 5 5 15
    layout: verticalBox
    height: 265

    ModuleInfoLabel
      text: Module name
    ModuleValueLabel
      id: moduleName

    ModuleInfoLabel
      text: Description
    ModuleValueLabel
      id: moduleDescription
      height: 100
      text-wrap: true

    //ModuleInfoLabel
    //  text: Autoload
    //ModuleValueLabel
    //  id: moduleAutoload

    //ModuleInfoLabel
    //  text: Autoload priority
    //ModuleValueLabel
    //  id: moduleLoadPriority
    //  text: 1000

    ModuleInfoLabel
      text: Author
    ModuleValueLabel
      id: moduleAuthor

    ModuleInfoLabel
      text: Website
    ModuleValueLabel
      id: moduleWebsite

    ModuleInfoLabel
      text: Version
    ModuleValueLabel
      id: moduleVersion

  Button
    id: moduleReloadButton
    anchors.top: moduleInfo.bottom
    anchors.left: moduleInfo.left
    margin-top: 8
    text: Load
    enabled: false
    @onClick: ModuleManager.reloadCurrentModule()

  Button
    id: moduleUnloadButton
    anchors.top: moduleInfo.bottom
    anchors.right: moduleInfo.right
    margin-left: 10
    margin-top: 8
    text: Unload
    enabled: false
    @onClick: ModuleManager.unloadCurrentModule()

  Button
    id: closeButton
    anchors.bottom: parent.bottom
    anchors.right: parent.right
    text: Close
    width: 60
    @onClick: ModuleManager.hide()