ChannelListLabel < Label
  text-auto-resize: true
  background-color: alpha
  focusable: true
  height: 16
  color: #c0c0c0

MainWindow
  id: channelsWindow
  !text: tr('Open Channel')
  size: 250 285
  focus-child: openPrivateChannelWith
  @onEscape: self:destroy()
  color: #c0c0c0

  Label
    anchors.top: parent.top
    anchors.left: parent.left
    !text: tr('Select a channel:')
    text-auto-resize: true

  TextList
    id: channelList
    size: 218 146
    anchors.top: prev.bottom
    anchors.left: parent.left
    margin-top: 5
    focusable: false
    vertical-scrollbar: channelsScrollBar
    background-color: #404040

  VerticalScrollBar
    id: channelsScrollBar
    anchors.top: prev.top
    anchors.bottom: prev.bottom
    anchors.right: prev.right
    margin: 1 1 1 0
    step: 14
    pixels-scroll: true

  Label
    id: openPrivateChannelWithLabel
    !text: tr('Open a private message channel:')
    anchors.top: prev.bottom
    anchors.left: parent.left
    margin-top: 11
    text-auto-resize: true

  TextEdit
    id: openPrivateChannelWith
    size: 218 16
    anchors.top: prev.bottom
    anchors.left: parent.left
    margin-top: 5

  HorizontalSeparator
    id: separator
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    margin-top: 6

  Button
    id: buttonCancel
    !text: tr('Cancel')
    width: 64
    anchors.right: parent.right
    anchors.bottom: parent.bottom
    margin-bottom: -6
    @onClick: self:getParent():destroy()

  Button
    id: buttonOpen
    anchors.right: prev.left
    anchors.bottom: parent.bottom
    margin-right: 6
    margin-bottom: -6
    !text: tr('Open')
    width: 64
    @onClick: self:getParent():onEnter()
