diff options
-rw-r--r-- | scene/gui/slider.cpp | 8 | ||||
-rw-r--r-- | thirdparty/README.md | 6 | ||||
-rw-r--r-- | thirdparty/fonts/Hack_Regular.ttf | bin | 399724 -> 307420 bytes | |||
-rw-r--r-- | thirdparty/fonts/LICENSE_Hack.md | 57 |
4 files changed, 26 insertions, 45 deletions
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index 665ae8b6dd..70b8616af1 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -184,10 +184,10 @@ void Slider::_notification(int p_what) { focus->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height))); */ if (ticks > 1) { - int tickarea = size.height - tick->get_height(); + int grabber_offset = (grabber->get_size().height / 2 - tick->get_height() / 2); for (int i = 0; i < ticks; i++) { if (!ticks_on_borders && (i == 0 || i + 1 == ticks)) continue; - int ofs = i * tickarea / (ticks - 1); + int ofs = (i * areasize / (ticks - 1)) + grabber_offset; tick->draw(ci, Point2i((size.width - widget_width) / 2, ofs)); } } @@ -205,10 +205,10 @@ void Slider::_notification(int p_what) { */ if (ticks > 1) { - int tickarea = size.width - tick->get_width(); + int grabber_offset = (grabber->get_size().width / 2 - tick->get_width() / 2); for (int i = 0; i < ticks; i++) { if ((!ticks_on_borders) && ((i == 0) || ((i + 1) == ticks))) continue; - int ofs = i * tickarea / (ticks - 1); + int ofs = (i * areasize / (ticks - 1)) + grabber_offset; tick->draw(ci, Point2i(ofs, (size.height - widget_height) / 2)); } } diff --git a/thirdparty/README.md b/thirdparty/README.md index 59f3685344..8c50081782 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -62,8 +62,8 @@ Use UI font if exists, because it has tight vertical metrics and good for UI. ### Hack Regular - Upstream: https://github.com/source-foundry/Hack -- Version: 2.020 -- License: Hack Open Font License v2.0 +- Version: 3.000 +- License: MIT + Bitstream Vera License ### DroidSans*.ttf @@ -272,7 +272,7 @@ Collection of single-file libraries used in Godot components. ### poshlib - Upstream: http://poshlib.hookatooka.com/poshlib/trac.cgi (username guest, password guest123) -- Version: 1.3.002 +- Version: 1.3.002 - License: MIT Files extracted from the upstream source: diff --git a/thirdparty/fonts/Hack_Regular.ttf b/thirdparty/fonts/Hack_Regular.ttf Binary files differindex a35ea2e4f4..f342700811 100644 --- a/thirdparty/fonts/Hack_Regular.ttf +++ b/thirdparty/fonts/Hack_Regular.ttf diff --git a/thirdparty/fonts/LICENSE_Hack.md b/thirdparty/fonts/LICENSE_Hack.md index e9fc8a1f87..ddd23a2b81 100644 --- a/thirdparty/fonts/LICENSE_Hack.md +++ b/thirdparty/fonts/LICENSE_Hack.md @@ -1,49 +1,30 @@ -## License +The work in the Hack project is Copyright 2017 Source Foundry Authors and licensed under the MIT License -Hack Copyright 2015, Christopher Simpkins with Reserved Font Name "Hack". +The work in the DejaVu project was committed to the public domain. Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera" -DejaVu modifications of the original Bitstream Vera Sans Mono typeface have been committed to the public domain. +### MIT License +Copyright (c) 2017 Source Foundry Authors +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -This Font Software is licensed under the Hack Open Font License v2.0 and the Bitstream Vera License. - -These licenses are copied below. - - -### Hack Open Font License v2.0 - -(Version 1.0 - 06 September 2015) - -(Version 2.0 - 27 September 2015) - -Copyright 2015 by Christopher Simpkins. All Rights Reserved. - -DEFINITIONS - -"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. - -PERMISSION AND CONDITIONS - -Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated source code, documentation, and binary files (the "Font Software"), to reproduce and distribute the modifications to the Bitstream Vera Font Software, including without limitation the rights to use, study, copy, merge, embed, modify, redistribute, and/or sell modified or unmodified copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: - -(1) The above copyright notice and this permission notice shall be included in all modified and unmodified copies of the Font Software typefaces. These notices can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. - -(2) The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word "Hack". - -(3) Neither the Font Software nor any of its individual components, in original or modified versions, may be sold by itself. - -TERMINATION - -This license becomes null and void if any of the above conditions are not met. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. - -Except as contained in this notice, the names of Christopher Simpkins and the Author(s) of the Font Software shall not be used to promote, endorse or advertise any modified version, except to acknowledge the contribution(s) of Christopher Simpkins and the Author(s) or with their explicit written permission. For further information, contact: chris at sourcefoundry dot org. - +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ### BITSTREAM VERA LICENSE |