瀏覽代碼

ComboBoxes now transparent

toomanysugar 4 年之前
父節點
當前提交
dc95c79de2

+ 1 - 1
src/main/resources/ActorRoleSegment.fxml

@@ -12,7 +12,7 @@
          <children>
             <AnchorPane maxWidth="1.7976931348623157E308" AnchorPane.leftAnchor="0.0" HBox.hgrow="ALWAYS">
                <children>
-                  <ComboBox fx:id="actorName" editable="true" prefWidth="150.0" stylesheets="@ComboBoxStyle.css" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
+                  <ComboBox fx:id="actorName" editable="true" prefWidth="150.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
                   <Pane prefHeight="3.0" style="-fx-background-color: #9f9f9f;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="25.0" />
                </children>
             </AnchorPane>

+ 3 - 3
src/main/resources/AddMovieWindow.fxml

@@ -137,9 +137,9 @@
 							  <VBox fx:id="actorsGridAncor" prefHeight="200.0" prefWidth="100.0" style="-fx-background-color: transparent;" />
 						   </content>
 						</ScrollPane>
-                     <ComboBox fx:id="directorTextBox" editable="true" layoutX="174.0" layoutY="248.0" prefHeight="25.0" prefWidth="409.0" stylesheets="@ComboBoxStyle.css" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="249.0" />
-                     <ComboBox fx:id="studioTextBox" editable="true" layoutX="174.0" layoutY="211.0" prefHeight="25.0" prefWidth="409.0" stylesheets="@ComboBoxStyle.css" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="211.0" />
-                     <ComboBox fx:id="genreTextBox" editable="true" layoutX="173.0" layoutY="91.0" prefHeight="25.0" prefWidth="409.0" stylesheets="@ComboBoxStyle.css" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="91.0" />
+                     <ComboBox fx:id="directorTextBox" editable="true" layoutX="174.0" layoutY="248.0" prefHeight="25.0" prefWidth="409.0" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="249.0" />
+                     <ComboBox fx:id="studioTextBox" editable="true" layoutX="174.0" layoutY="211.0" prefHeight="25.0" prefWidth="409.0" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="211.0" />
+                     <ComboBox fx:id="genreTextBox" editable="true" layoutX="173.0" layoutY="91.0" prefHeight="25.0" prefWidth="409.0" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="91.0" />
 					 </AnchorPane>
 					 <AnchorPane prefWidth="604.0" VBox.vgrow="SOMETIMES">
 						<children>

+ 42 - 19
src/main/resources/AddMovieWindowStyle.css

@@ -12,9 +12,9 @@
 }
 
 .combo-box {
-    -fx-background-color: #212121, #212121;
-    -fx-background: #9f9f9f;
-    -fx-color: #9f9f9f;
+    -fx-background-color: transparent, transparent;
+    -fx-background: transparent;
+    -fx-color: transparent;
 }
 
 .combo-box .text-input {
@@ -23,31 +23,54 @@
     -fx-color: transparent;
     -fx-text-fill: #9F9F9F;
 }
-
+/*Элемент списка невыбранный*/
 .combo-box .list-cell
 {
-    -fx-background: #212121;
+    -fx-background-color: #212121;
     -fx-text-fill: #9F9F9F;
+    -fx-border-width: 0 1 1 1;
+    -fx-border-color: #9F9F9F;
 }
-
-.combo-box-popup .list-view .list-cell:filled:selected, .combo-box-popup .list-view .list-cell:filled:selected:hover
+/*Элемент списка выбранный наведение*/
+.combo-box-popup .list-view .list-cell:filled:focused,
+.combo-box-popup .list-view .list-cell:filled:hover
 {
-    -fx-background: #212121;
-    -fx-background-color: #212121;
+    -fx-background-color: #121212;
     -fx-text-fill: #9F9F9F;
 }
 
-.combo-box-base:hover
-{
-    -fx-color: #9f9f9f;
-    -fx-text-fill: #212121;
+
+.combo-box:focused {
+    -fx-border-insets: 0 0 0 0;
+    -fx-border-width: 0 0 0 0;
 }
 
+.combo-box:focused > .text-field {
+    -fx-border-color: transparent;
+}
 
-.combo-box-popup .list-view
-{
-    -fx-background-color: #212121, #212121;
-    -fx-background-insets: 0, 1;
-    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 8, 0.0 , 0 , 0 );
-    -fx-text-fill: #9F9F9F;
+.combo-box-base .arrow-button {
+    -fx-background-color: transparent;
+}
+
+.combo-box-base:focused > .list-cell,
+.combo-box-base:focused > .text-field {
+    -fx-background-color: transparent;
+    -fx-border-width: 2;
 }
+
+.combo-box-popup .list-view .scroll-bar:vertical {
+    -fx-color:  #9F9F9F;
+    -fx-pref-width: 12;
+}
+
+.combo-box-popup .list-view .scroll-bar:vertical .track {
+    -fx-background-color: #212121;
+    -fx-border-color: #212121;
+}
+
+.combo-box-popup .list-view .scroll-bar:vertical .thumb:hover,
+.combo-box-popup .list-view .scroll-bar:vertical .thumb:pressed {
+    -fx-color:  #9F9F9F;
+    -fx-pref-width: 12;
+}

+ 0 - 14
src/main/resources/ComboBoxStyle.css

@@ -1,14 +0,0 @@
-.root {
-    -fx-font-size: 11pt;
-    -fx-font-family: "Verdana";
-    -fx-background: #FFFFFF;
-}
-
-.normal-label {
-    -fx-text-fill: #005EB8;
-}
-
-.normal-text-field {
-    -fx-text-fill: #333333;
-}
-

+ 3 - 3
src/main/resources/EditMovieWindow.fxml

@@ -137,9 +137,9 @@
                            <VBox fx:id="actorsGridAncor" prefHeight="200.0" prefWidth="100.0" style="-fx-background-color: transparent;" />
                         </content>
                      </ScrollPane>
-                     <ComboBox fx:id="directorTextBox" editable="true" layoutX="174.0" layoutY="248.0" prefHeight="25.0" prefWidth="409.0" stylesheets="@ComboBoxStyle.css" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="248.0" />
-                     <ComboBox fx:id="studioTextBox" editable="true" layoutX="174.0" layoutY="211.0" prefHeight="25.0" prefWidth="409.0" stylesheets="@ComboBoxStyle.css" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="211.0" />
-                     <ComboBox fx:id="genreTextBox" editable="true" layoutX="173.0" layoutY="91.0" prefHeight="25.0" prefWidth="409.0" stylesheets="@ComboBoxStyle.css" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="91.0" />
+                     <ComboBox fx:id="directorTextBox" editable="true" layoutX="174.0" layoutY="248.0" prefHeight="25.0" prefWidth="409.0" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="248.0" />
+                     <ComboBox fx:id="studioTextBox" editable="true" layoutX="174.0" layoutY="211.0" prefHeight="25.0" prefWidth="409.0" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="211.0" />
+                     <ComboBox fx:id="genreTextBox" editable="true" layoutX="173.0" layoutY="91.0" prefHeight="25.0" prefWidth="409.0" AnchorPane.leftAnchor="173.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="91.0" />
                   </AnchorPane>
                   <AnchorPane prefWidth="604.0" VBox.vgrow="SOMETIMES">
                      <children>