Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8162926

unexpected change of button font weight

XMLWordPrintable

    • x86
    • other

      FULL PRODUCT VERSION :
      java version "1.8.0_102"
      Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.10586]

      A DESCRIPTION OF THE PROBLEM :
      error with fxml and css.
      unexpected change of button font weight.
      it occurs while clicking around buttons.
      fxml and css are listed below

      /**myform.css*/
      .root {
          /*-fx-background-color: beige;*/
          /*-fx-font-family: "Arial";*/
          /*-fx-font-weight: normal;*/
      }

      .button {
          -fx-text-fill: white;
          -fx-font-weight: bold;
          -fx-background-color: linear-gradient(#61a2b1, #2A5058);
          -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.6), 5, 0.0, 0, 1);
      }

      .button:hover {
          -fx-background-color: linear-gradient(#43808c, #2A5058);
      }

      .button:pressed {
          -fx-background-color: #2A5058;
      }

      #login-title-label {
          -fx-font-size: 32px;
          -fx-font-family: "Times New Roman";
          -fx-fill: #818181;
          -fx-effect: innershadow(three-pass-box, rgba(0, 0, 0, 0.7), 6, 0.0, 0, 2);
      }

      .label {
      }



      /**myform.fxml*/
      <?xml version="1.0" encoding="UTF-8"?>

      <?import javafx.scene.chart.*?>
      <?import javafx.collections.*?>
      <?import javafx.scene.text.*?>
      <?import java.net.*?>
      <?import javafx.geometry.*?>
      <?import javafx.scene.control.*?>
      <?import java.lang.*?>
      <?import javafx.scene.layout.*?>
      <?import java.net.URL?>
      <?import javafx.geometry.Insets?>
      <?import javafx.collections.FXCollections?>

      <TabPane id="main-pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="561.0" prefWidth="808.0" tabClosingPolicy="UNAVAILABLE" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
          <tabs>
           
              <Tab text="Задачи">
                  <content>
                      <HBox prefHeight="100.0" prefWidth="200.0">
                          <children>
                              <TableView prefHeight="532.0" prefWidth="435.0">
                                  <columns>
                                      <TableColumn prefWidth="75.0" text="Название" />
                                      <TableColumn prefWidth="96.0" text="Состояние" />
                                      <TableColumn prefWidth="90.0" text="Осталось" />
                                      <TableColumn prefWidth="96.0" text="Прогресс" />
                                  </columns>
                              </TableView>
                              <GridPane prefHeight="532.0" prefWidth="365.0">
                                  <columnConstraints>
                                      <ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="163.0" minWidth="10.0" prefWidth="146.0" />
                                      <ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="222.0" minWidth="10.0" prefWidth="170.0" />
                                      <ColumnConstraints hgrow="SOMETIMES" maxWidth="184.0" minWidth="10.0" prefWidth="20.0" />
                                  </columnConstraints>
                                  <rowConstraints>
                                      <RowConstraints maxHeight="176.0" minHeight="2.0" prefHeight="58.0" vgrow="SOMETIMES" />
                                      <RowConstraints maxHeight="427.0" minHeight="0.0" prefHeight="52.0" vgrow="SOMETIMES" />
                                      <RowConstraints maxHeight="489.0" minHeight="0.0" prefHeight="52.0" vgrow="SOMETIMES" />
                                      <RowConstraints maxHeight="489.0" minHeight="0.0" prefHeight="73.0" vgrow="SOMETIMES" />
                                      <RowConstraints maxHeight="489.0" minHeight="10.0" prefHeight="65.0" vgrow="SOMETIMES" />
                                      <RowConstraints maxHeight="489.0" minHeight="10.0" prefHeight="83.0" vgrow="SOMETIMES" />
                              <RowConstraints maxHeight="489.0" minHeight="10.0" prefHeight="25.0" vgrow="SOMETIMES" />
                              <RowConstraints maxHeight="489.0" minHeight="10.0" prefHeight="27.0" vgrow="SOMETIMES" />
                              <RowConstraints maxHeight="489.0" minHeight="10.0" prefHeight="48.0" vgrow="SOMETIMES" />
                                      <RowConstraints maxHeight="489.0" minHeight="10.0" prefHeight="55.0" vgrow="SOMETIMES" />
                              <RowConstraints maxHeight="489.0" minHeight="10.0" prefHeight="36.0" vgrow="SOMETIMES" />
                                  </rowConstraints>
                                  <children>
                                      <Label alignment="CENTER" prefHeight="32.0" prefWidth="122.0" text="Название" />
                                      <Label alignment="CENTER" prefHeight="32.0" prefWidth="144.0" text="Количество просмотров" GridPane.rowIndex="1" />
                                      <Label alignment="CENTER" prefHeight="32.0" prefWidth="122.0" text="Продолжительность" GridPane.rowIndex="2" />
                                      <Label alignment="CENTER" prefHeight="32.0" prefWidth="122.0" text="Время начала" GridPane.rowIndex="3" />
                                      <Label alignment="CENTER" prefHeight="32.0" prefWidth="122.0" text="Состояние" GridPane.rowIndex="4" />
                                      <TextField text="Нет названия" GridPane.columnIndex="1" />
                                      <TextField text="0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                                      <TextField text="Нет продолжительности" GridPane.columnIndex="1" GridPane.rowIndex="2" />
                                      <TextField text="Нет времени" GridPane.columnIndex="1" GridPane.rowIndex="3" />
                                      <Button mnemonicParsing="false" prefHeight="39.0" prefWidth="98.0" text="Добавить" GridPane.rowIndex="5">
                                          <font>
                                              <Font size="14.0" />
                                          </font>
                                      </Button>
                                      <Button mnemonicParsing="false" prefHeight="39.0" prefWidth="98.0" text="Сохранить" GridPane.columnIndex="1" GridPane.rowIndex="5">
                                          <font>
                                              <Font size="14.0" />
                                          </font>
                                      </Button>
                                      <Button mnemonicParsing="false" prefHeight="39.0" prefWidth="98.0" text="Старт" GridPane.columnIndex="1" GridPane.rowIndex="9">
                                          <font>
                                              <Font size="14.0" />
                                          </font>
                                      </Button>


                                      <ChoiceBox prefHeight="25.0" prefWidth="139.0" value="не начато" GridPane.columnIndex="1" GridPane.rowIndex="4">
                                          <items>
                                              <FXCollections fx:factory="observableArrayList">
                                                  <String fx:value="не начато" />
                                                  <String fx:value="активно" />
                                                  <String fx:value="завершено" />
                                              </FXCollections>
                                          </items>
                                      </ChoiceBox>
                              <ProgressBar prefHeight="18.0" prefWidth="322.0" progress="0.0" GridPane.columnSpan="2" GridPane.rowIndex="8" />
                              <Label alignment="CENTER" prefHeight="32.0" prefWidth="122.0" text="Прогресс" GridPane.columnSpan="2" GridPane.rowIndex="7" />
                              <Separator prefWidth="200.0" GridPane.columnSpan="3" GridPane.rowIndex="6" />
                                  </children>
                              </GridPane>
                          </children>
                      </HBox>
                  </content>
              </Tab>
            
          </tabs>


          <stylesheets>
              <URL value="@myform.css" />
          </stylesheets>
      </TabPane>



      REPRODUCIBILITY :
      This bug can be reproduced always.

            jgiles Jonathan Giles
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: