/*
 * Custom styling for GPS.
 */

/* You can override the default theme colors. Most gtk+ themes are
 * carefully setup so that they do not hard-code colors, but use a number
 * of predefined named colors and shades of them. For instance:
 */
/*
   @define-color base_color black;
   @define-color bg_color #fff;
   @define-color theme_bg_color green;
*/

@define-color middle-gray #888;
@define-color border-gray #666;

@define-color mdi_border_color #ddd;
@define-color local_toolbar_color #f8f8f8;
@define-color notebook_background #ededed;
@define-color toolbar_button_color #555;
@define-color toolbar_button_insensitive_color #aaa;
@define-color inactive_tab_color #666;
@define-color active_tab_color black;
@define-color scrollbar_slider_color #c3c5c6;
@define-color gutter_color grey;
@define-color gutter_background #f8f8f8;

@define-color browser_decoration_color grey;
@define-color browser_decoration_background #f8f8f8;

@define-color completion-border-color shade (@theme_base_color, 0.7);
@define-color completion-selected-color mix(@theme_base_color, @middle-gray, 0.5);
@define-color completion-background-color shade(@theme_base_color, 1.10);
@define-color completion-notes-color mix(shade(@theme_base_color, 1.40), @middle-gray, 0.2);
@define-color completion-notes-text-color mix(@theme_fg_color, @middle-gray, 0.2);

@define-color tooltip-border-color shade (@theme_base_color, 0.7);
@define-color tooltip-background-color mix(shade(@theme_base_color, 1.40), @middle-gray, 0.2);
@define-color tooltip-text-color mix(@theme_fg_color, @middle-gray, 0.2);

* {
   /* Reduce the size of the scroll arrows in notebooks */
   -GtkWidget-scroll-arrow-hlength: 8;
   -GtkWidget-scroll-arrow-vlength: 8;
   -GtkNotebook-arrow-spacing: 0;
}

.gps-task-manager GtkProgressBar {
   -GtkProgressBar-min-horizontal-bar-height: 1;
}

.gps-local-toolbar {  /* local toolbar in the panes/views */
}

*:selected,
*:selected:focused {
    background-color: #B4D5FF;
}

GtkTextView.readonly {
   /* for read-only editors */
   /* background-color: rgb(200,200,200); */
}

.mdi tab GtkLabel, .mdifocused tab GtkLabel {
   color:   @theme_fg_color;
   opacity: 1.0;
}

/*********************
 * Menus
 *********************/

.window-frame {
   /* gtk+ displays a 4px semi-transparent around menus the first time they
    * are displayed. Perhaps this is a resize handle ? */
   box-shadow: none;
}
GtkMenu {
  border: 2px solid mix(@theme_base_color, @mdi_border_color, 0.5);
}

/*********************
 * Panes
 *********************/

.pane-separator {
   background-color: @notebook_background;
   background-image: none;
}

/*********************
 * Notebooks
 *********************/

.notebook.mdi {
  -GtkNotebook-initial-gap: 5;

  background-color: @notebook_background;
  background-image: none;
  border: 1px solid @mdi_border_color;
  border-top-width: 0px;

   /* No space between tabs */
   -GtkNotebook-tab-overlap: 0;
}

GtkNotebook.noTabs {
  /* notebooks with no tabs need borders all around */
  border: 1px solid @mdi_border_color;
}

.notebook.mdi tab GtkLabel {
   font-weight: normal;
   color: @inactive_tab_color;
}

.notebook.mdi.header {
  border: none;
  box-shadow: none;
}

.notebook.mdi tab {
   border-width: 0;
}

.notebook.mdi tab:active {
   background-color: @local_toolbar_color;
   background-image: none;
}

.notebook.mdi GtkEventBox.active-page GtkLabel {
   color: @active_tab_color;
   background-image: none;
}

.notebook.mdi tab:hover {
   background-color: @local_toolbar_color;
}

/* Shenanigans to support tabs-not-on-top */

.notebook.leftTabs, .notebook.rightTabs {
   /* When the MDI tabs are displayed on the left or on the right, we do not
    * want an extra space at the top, before the first tab */
   -GtkNotebook-initial-gap: 0;
}

.notebook.mdi tab.top,
.notebook.mdi tab.bottom {
   padding: 5px 2px 5px 6px;
}

.notebook.mdi tab.left {
   padding: 2px 5px 6px 5px;
}
.notebook.mdi tab.right {
   padding: 6px 5px 2px 5px;
}

.notebook.mdi.leftTabs {
  border-top-width: 1px;
  border-left-width: 0px;
}

.notebook.mdi.rightTabs {
  border-top-width: 1px;
  border-right-width: 0px;
}

.notebook.mdi.bottomTabs {
  border-top-width: 1px;
  border-bottom-width: 0px;
}

.notebook.mdi tab.top {
   border-bottom-width: 1px;
}

.notebook.mdi tab.top:active {
   border: 1px solid @mdi_border_color;
}

.notebook.mdi tab.left:active {
   border: 1px solid @mdi_border_color;
}

.notebook.mdi tab.right:active {
   border: 1px solid @mdi_border_color;
}

.notebook.mdi tab.bottom:active {
   border: 1px solid @mdi_border_color;
}

.notebook.mdi tab.left {
   border-top-width: 0px;
   border-right-width: 1px;
}

.notebook.mdi tab.right {
   border-top-width: 0px;
   border-left-width: 1px;
}

.notebook.mdi tab.bottom {
   border-top-width: 1px;
}

.notebook.mdi.header.top {
  border-bottom: 1px solid @mdi_border_color;
}

.notebook.mdi.header.left {
  border-right: 1px solid @mdi_border_color;
}

.notebook.mdi.header.right {
  border-left: 1px solid @mdi_border_color;
}

.notebook.mdi.header.bottom {
  border-top: 1px solid @mdi_border_color;
}

.notebook.mdi tab:active.top {
   border-top-color: @theme_selected_bg_color;
   border-top-width: 3px;
   border-bottom-width: 0;
}

.notebook.mdi tab:active.left {
   border-left-color: @theme_selected_bg_color;
   border-left-width: 3px;
   border-right-width: 0;
}

.notebook.mdi tab:active.right {
   border-right-color: @theme_selected_bg_color;
   border-right-width: 3px;
   border-left-width: 0;
}

.notebook.mdi tab:active.bottom {
   border-bottom-color: @theme_selected_bg_color;
   border-bottom-width: 3px;
   border-top-width: 0;
}

/**********************
 * Scrollbars
 **********************/

.scrollbar {
/*   background-color: @local_toolbar_color; */

/* Uncomment this to activate scrollbar steppers
  -GtkScrollbar-has-backward-stepper: true;
  -GtkScrollbar-has-forward-stepper: true;
*/

}
.scrollbar.slider {
   background-color: @scrollbar_slider_color;
}

/**********************
 * Toolbars
 **********************/

.toolbar GtkButton {
  padding: 4px;
}

/* Let's condense things in the local toolbars of the views */
.gps-local-toolbar {
   background: @local_toolbar_color;
   border-bottom-width: 1px;
   border-bottom-color: @mdi_border_color;
   margin-bottom: 10px;
   padding: 0px;
}

.gps-editor-status-bar {
   background: @local_toolbar_color;
}

.gps-switches-editor GtkScrolledWindow {
   background: @theme_base_color;
}

.gps-local-toolbar * {
   margin: 0px;
   padding: 2px;
}

.toolbar GtkImage,
.toolbar {
  color: @toolbar_button_color;
}

.toolbar GtkImage:insensitive{
  color: @toolbar_button_insensitive_color;
}

/***************************
 * Search fields
 ***************************/

/* Search and filter fields */
GtkEntry.search {
  border-radius: 3px;
  border-color: transparent;
  border-width: 1px;
  box-shadow: none;
  padding-left: 2px;
}

.completion-list {
   /* The list of possible completions, in a completion entry */
}

#completion-frame {
    border-style:solid;
    border-width:1px;
    border-color: @completion-border-color;
    background-color: @completion-background-color;
    margin: 5px;
    padding: 5px;
}

.window-rounded {
    border-radius: 4px;
}

#completion-scroll {
    margin: 5px;
    padding: 5px;
}

#completion-view {
    background-color: @completion-background-color;
}

#completion-view:selected {
    background-color: @completion-selected-color;
    border-radius: 5px;
    color:@theme_fg_color;
}

#notes-window {
    padding:20px;
    margin:20px;
}

#notes-frame {
    border-color: @completion-border-color;
    background-color: @completion-notes-color;
    padding: 5px;
}

#notes-frame * {
    background-color: @completion-notes-color;
    color: @completion-notes-text-color;
    text-shadow: none;
}

/**********************************
 * Editors
 **********************************/

.gps_gutter {
  background-color: @gutter_background;
  color: @gutter_color;
}

/**********************************
 * Browsers
 **********************************/

.gps_browser_decoration {
  background-color: @browser_decoration_background;
  color: @browser_decoration_color;
}

/**********************************
 * Tooltips
 **********************************/

.tooltip {
   color: @tooltip-text-color;
   text-shadow: none;
   margin: 0;
   border-radius: 0;
   border: 1px solid @tooltip-border-color;
}
.tooltip.background {
   background-color: @tooltip-background-color;
}

.tooltip * {
   padding: 12px;
}

/*
 * Editors
 * Control the color of links displayed in the status bar of editors
 */
/*
-GtkWidget-link-color: @link_color;
-GtkWidget-visited-link-color: @link_color;
*/

/**
 * An example on how to redefine left and right keys so that they navigate
 * up and down in the tree views (instead of just left and right between
 * columns). The best here is to use the default up and down keys though.
 * See also the treemove.py plug-in.
 */

/*
@binding-set gtk-gps-tree-view {
   bind "Right" { "move-cursor" (display-lines, 1) };
   bind "Left" { "move-cursor" (display-lines, -1) };
}
GtkTreeView { gtk-key-bindings: gtk-gps-tree-view; }
*/
