# SLanXP Final - port of Visual Style for Windows XP by lassekongo83
# License: Creative Commons Attribution-Noncommercial-Share Alike 3.0
# Author: weakhead
# DeviantART profile: http://weakhead.deviantart.com/
# Theme was tested with PekWM 1.11
# TIP: To hide borders when using maximize button, uncomment lines 85 and 86, then comment line 84 and reload/restart PekWM. Toggling will be disabled - to undo maximized state and bring back borders, do right-click on maximize button.

$FONT = "XFT#Trebuchet MS:size=9#Left"
$FONT_TITLE = "XFT#Trebuchet MS:size=9:bold#Center#"
$MENU_TITLE = "XFT#Trebuchet MS:size=9:bold#Center#"

Require {
  Templates = "True"
}

Define = "BaseDecor" {
  Height = "22"

  # Increase first number to bring title text downwards
  Pad = "3 5 21 0"

  Focused = "Image title.png"
  Unfocused = "Image title.png"

  Tab {
    Focused = "Empty"
    FocusedSelected = "Empty"
    Unfocused = "Empty"
    UnfocusedSelected = "Empty"
  }
  Separator {
    Focused = "Empty"
    Unfocused = "Empty"
  }
  Font {
    Focused = "$FONT_TITLE"
  }
  FontColor {
    Focused = "#999999"
    FocusedSelected = "#ffffff"
    Unfocused = "#666666"
    UnfocusedSelected = "#666666"
  }
  Border {
    Focused {
      TopLeft = "Image top-left.png"
      Top = "Image top-border.png"
      TopRight = "Image top-right.png"
      Left =  "Image border-left.png"
      Right = "Image border-right.png"
      BottomLeft = "Image bottom-left.png"
      Bottom = "Image bottom-border.png"
      BottomRight = "Image bottom-right.png"
    }
    Unfocused {
      TopLeft = "Image top-left.png"
      Top = "Image top-border.png"
      TopRight = "Image top-right.png"
      Left =  "Image border-left.png"
      Right = "Image border-right.png"
      BottomLeft = "Image bottom-left.png"
      Bottom = "Image bottom-border.png"
      BottomRight = "Image bottom-right.png"
    }
  }
}

Define = "BaseButtons" {
  Buttons {
    Right = "Close" {
      Focused = "Image close.png"
      Unfocused = "Image close-unfocus.png"
      Hoover = "Image close-hover.png"
      Pressed = "Image close-press.png"
      Button = "1" { Actions = "Close" }
      Button = "3" { Actions = "Kill" }
    }

    Right = "Maximize" {
      Focused = "Image max.png"
      Unfocused = "Image max-unfocus.png"
      Hoover = "Image max-hover.png"
      Pressed = "Image max-press.png"
      Button = "1" { Actions = "Toggle Maximized 1 1" }
#      Button = "1" { Actions = "Unset DecorBorder; Set Maximized" }
#      Button = "3" { Actions = "Set DecorBorder; Unset Maximized" }
    }

    Right = "Iconify" {
      Focused = "Image min.png"
      Unfocused = "Image min-unfocus.png"
      Hoover = "Image min-hover.png"
      Pressed = "Image min-press.png"
      Button = "1" { Actions = "Set Iconified" }
    }
      
  }
}

Define = "MenuDecor" {
  Height = "22"

  # Increase first number to bring title text downwards
  Pad = "3 0 0 0"

  Focused = "Image title.png"
  Unfocused = "Image title.png"

  Tab {
    Focused = "Empty"
    FocusedSelected = "Empty"
    Unfocused = "Empty"
    UnfocusedSelected = "Empty"
  }
  Separator {
    Focused = "Empty"
    Unfocused = "Empty"
  }
  Font {
    Focused = "$MENU_TITLE"
  }
  FontColor {
    Focused = "#999999"
    FocusedSelected = "#ffffff"
    Unfocused = "#828282"
    UnfocusedSelected = "#828282"
  }
  Border {
    Focused {
      TopLeft = "Image menu-top-left.png"
      Top = "Image top-border.png"
      TopRight = "Image menu-top-right.png"
      Left =  "Image menu-border-left.png"
      Right = "Image menu-border-right.png"
      BottomLeft = "Image menu-bottom-left.png"
      Bottom = "Image menu-bottom-border.png"
      BottomRight = "Image menu-bottom-right.png"
    }
    Unfocused {
      TopLeft = "Image menu-top-left.png"
      Top = "Image top-border.png"
      TopRight = "Image menu-top-right.png"
      Left =  "Image menu-border-left.png"
      Right = "Image menu-border-right.png"
      BottomLeft = "Image menu-bottom-left.png"
      Bottom = "Image menu-bottom-border.png"
      BottomRight = "Image menu-bottom-right.png"
    }
  }
}

Define = "EmptyDecor" {
  Focused = "Empty"
  Unfocused = "Empty"

  Tab {
    Focused = "Empty"
    FocusedSelected = "Empty"
    Unfocused = "Empty"
    UnfocusedSelected = "Empty"
  }

  Separator {
    Focused = "Empty"
    Unfocused = "Empty"
  }

  Font {
    Focused = "Empty"
  }

  FontColor {
    Focused = "Empty"
    FocusedSelected = "Empty"
    Unfocused = "Empty"
    UnfocusedSelected = "Empty"
  }    

  Border {
    Focused {
      TopLeft = "Empty"
      Top = "Empty"
      TopRight = "Empty"
      Left =  "Empty"
      Right = "Empty"
      BottomLeft = "Empty"
      Bottom = "Empty"
      BottomRight = "Empty"
    }
    Unfocused {
      TopLeft = "Empty"
      Top = "Empty"
      TopRight = "Empty"
      Left =  "Empty"
      Right = "Empty"
      BottomLeft = "Empty"
      Bottom = "Empty"
      BottomRight = "Empty"
    }
  }
}

PDecor {
  Decor = "Default" {
    Title {
      @BaseDecor
      @BaseButtons
    }
  }

  Decor = "Menu" {
    Title {
      @MenuDecor
    }
  }
  
  Decor = "WorkspaceIndicator" {
    Title {
      @MenuDecor
    }
  }

  Decor = "Titlebarless" {
    Title {
      @EmptyDecor
    }
  }

  Decor = "Statuswindow" {
    Title {
      @EmptyDecor
    }
  }
}

Harbour {
  Texture = "Solid #060606"
}

Menu {
  Pad = "0 0 4 4" 

  Focused {
    Font = "$FONT"
    Background = "Solid #e9e5da"
    Item = "Solid #e9e5da"
    Text = "#000000" 
    Separator = "Image menuline.png#Scaled"
    Arrow = "Image arrow.png"
  }
  Unfocused {
    Font = "$FONT"
    Background = "Solid #e9e5da"
    Item = "Solid #e9e5da"
    Text = "#000000"
    Separator = "Image menuline.png#Scaled"
    Arrow = "Image arrow.png"
  }
  Selected {
    Font = "$FONT"
    Background = "Solid #2d2e2e"
    Item = "Solid #2d2e2e"
    Text = "#ffffff"
    Arrow = "Image arrow_focus.png"
  }
}

CmdDialog {
  Font = "$FONT"
  Texture = "Solid #e9e5da"
  Text = "#000000"
  Pad = "3 0 1 10"
}

Status {
  Font = "$FONT"
  Texture = "Solid #e9e5da"
  Text = "#000000"
  Pad = "2 2 10 10"
}

WorkspaceIndicator {
  Font = "$FONT_TITLE"
  Background = "Solid #060606"
  Workspace = "Solid #e9e5da"
  WorkspaceActive = "Solid #2d2e2e"
  Text = "#828282"
  EdgePadding = "1"
  WorkspacePadding = "1"
}