equal
deleted
inserted
replaced
765 // See if this is a class specific value. |
765 // See if this is a class specific value. |
766 String classKey = CLASS_SPECIFIC_MAP.get(key); |
766 String classKey = CLASS_SPECIFIC_MAP.get(key); |
767 if (classKey != null) { |
767 if (classKey != null) { |
768 Object value = getClassSpecificValue(classKey); |
768 Object value = getClassSpecificValue(classKey); |
769 if (value != null) { |
769 if (value != null) { |
|
770 //This is a workaround as the "slider-length" property has been |
|
771 //deprecated for GtkScale from gtk 3.20, so default value of 31 |
|
772 //is used and makes redering of slider wrong. Value 14 is being |
|
773 //used as default value for Slider.thumbHeight is 14 and making |
|
774 //width 14 as well makes slider thumb render in proper shape |
|
775 if ("Slider.thumbWidth".equals(key) && value.equals(31)) { |
|
776 return 14; |
|
777 } |
770 return value; |
778 return value; |
771 } |
779 } |
772 } |
780 } |
773 |
781 |
774 // Is it a specific value ? |
782 // Is it a specific value ? |
777 } |
785 } |
778 else if (key == "Slider.tickColor") { |
786 else if (key == "Slider.tickColor") { |
779 return getColorForState(context, ColorType.FOREGROUND); |
787 return getColorForState(context, ColorType.FOREGROUND); |
780 } |
788 } |
781 else if (key == "ScrollBar.minimumThumbSize") { |
789 else if (key == "ScrollBar.minimumThumbSize") { |
|
790 //This is a workaround as the "min-slider-length" property has been |
|
791 //deprecated for GtkScrollBar from gtk 3.20, so default value of 21 |
|
792 //is used and makes ScrollBar thumb very small. Value 40 is being |
|
793 //used as this is the value mentioned in css files |
782 int len = |
794 int len = |
783 getClassSpecificIntValue(context, "min-slider-length", 21); |
795 getClassSpecificIntValue(context, "min-slider-length", 21); |
|
796 if (len == 21) { |
|
797 len = 40; |
|
798 } |
784 JScrollBar sb = (JScrollBar)context.getComponent(); |
799 JScrollBar sb = (JScrollBar)context.getComponent(); |
785 if (sb.getOrientation() == JScrollBar.HORIZONTAL) { |
800 if (sb.getOrientation() == JScrollBar.HORIZONTAL) { |
786 return new DimensionUIResource(len, 0); |
801 return new DimensionUIResource(len, 0); |
787 } else { |
802 } else { |
788 return new DimensionUIResource(0, len); |
803 return new DimensionUIResource(0, len); |