pax_global_header00006660000000000000000000000064143702103650014513gustar00rootroot0000000000000052 comment=6b8462073c37416b76b91dfe4ccbad30f2d34847 qqc2-suru-style-0.20230206/000077500000000000000000000000001437021036500151115ustar00rootroot00000000000000qqc2-suru-style-0.20230206/.gitignore000066400000000000000000000000301437021036500170720ustar00rootroot00000000000000*.user build .clickable qqc2-suru-style-0.20230206/.qmake.conf000066400000000000000000000001711437021036500171330ustar00rootroot00000000000000load(qt_build_config) CONFIG += warning_clean DEFINES += QT_NO_FOREACH QQC2_SOURCE_TREE = $$PWD MODULE_VERSION = 5.8.1 qqc2-suru-style-0.20230206/AUTHORS000066400000000000000000000004201437021036500161550ustar00rootroot00000000000000Alberto Mardegan Brian Douglass Chris Clime Dan Chapman Daniel Kutka Dano6 Florian Leeber Guido Berhoerster JBB JBBgameich Joan CiberSheep Johannes Renkl Luca Weiss Maciej Sopylo Maciej Sopyło Marius Gripsgard Michele Mike Gabriel Rodney Rodney Dawes Stefano Verzegnassi qqc2-suru-style-0.20230206/ChangeLog000066400000000000000000000205271437021036500166710ustar00rootroot000000000000002023-02-06 Mike Gabriel * Release 0.20230206 (HEAD -> main, tag: 0.20230206) 2023-01-19 Mike Gabriel * Merge branch 'qt6-support' into 'main' (aefd4a7) 2023-01-18 Rodney Dawes * Enable building against both Qt5 and Qt6 (6c82553) 2023-01-17 Mike Gabriel * Merge branch 'feat/live-switch' into 'main' (b31c1c8) 2023-01-15 Maciej Sopylo * Enable live switching when theme file changes (cb68f8a) 2023-01-15 Mike Gabriel * Merge branch 'focal-fix-suru-dark' into 'main' (e38d86f) 2023-01-15 Maciej Sopyło * Fixed SuruDark detection on focal (8ba2301) 2022-06-07 Florian Leeber * Merge branch 'qt5.12-imports' into 'main' (b4c0f34) 2022-06-07 Guido Berhoerster * Merge branch 'packaging-cleanup' into 'main' (15c1884) 2022-06-06 Alberto Mardegan * Update QML imports for Qt 5.12 (73a23b3) 2022-05-27 Guido Berhoerster * Release new version (15b9e1e) * Update Maintainer, Homepage, VCS URLs (0e9d45f) * Move Jenkinsfile to debian/ (89db63b) 2021-11-23 Daniel Kutka * Add support for icons and 5.12 fixes (#56) (428670b) 2021-02-02 Rodney * Merge pull request #54 from ubports/xenial_-_fix-qmldir (ab4a8de) 2021-01-27 Rodney Dawes * Move the internal implementation items to impl subdir (fb257d5) 2021-01-12 Brian Douglass * Merge pull request #52 from ubports/xenial_-_qt-5-12 (961b601) 2021-01-11 Rodney Dawes * Update Jenkinsfile (b7fd5e1) 2020-09-05 dano6 * Fix ComboBox for 5.12 (dd92a6f) 2020-09-01 dano6 * Port CheckIndicator and SpinBox to QT 5.12 (3d7f6a4) 2020-09-01 Rodney Dawes * Add missing QtQuick.Controls 2 import (54f7dbc) 2020-09-28 Marius Gripsgard * Merge pull request #50 from mardy/crossbuilder (6d9fd26) 2020-09-26 Alberto Mardegan * debian/rules: do not override existing QT_SELECT value (443c00c) 2020-06-16 Brian Douglass * Merge pull request #45 from ubports/fix-editable-combo-box (4bd56af) 2020-05-28 Brian Douglass * Added nasty hack to allow clickable to work again (b4ef28c) * Fixed the combo box's editable state (4e8368a) 2020-01-26 Johannes Renkl * Removed type registration of Label (#41) (5142b36) 2020-01-26 Luca Weiss * Fix missing .qml files in Qt 5.9 (#40) (4c3b6cf) 2020-01-24 Luca Weiss * Port C++ parts to Qt 5.12 (#38) (f1cd481) 2019-12-11 Brian Douglass * Merge pull request #37 from cibersheep/xenial (c7b04bf) 2019-12-11 Joan CiberSheep * Set Elevation shadow to grey (b58b154) 2019-12-11 Brian Douglass * Merge pull request #36 from cibersheep/xenial (6a50e44) 2019-12-10 Joan CiberSheep * Fix to Sliders handler light and dark mode (8894516) 2019-12-06 Brian Douglass * Merge pull request #35 from balcy/xenial (1f0da96) 2019-12-02 Chris Clime * add foregroundColor to SpinBox (5160595) 2019-08-25 Brian Douglass * Merge pull request #33 from ubports/xenial_-_label-wrap (89707e3) 2019-08-23 Brian Douglass * Follow upstream's default for word wrap (9d27650) 2019-05-30 Joan CiberSheep * Merge pull request #30 from ubports/xenial_-_fix-dial (0f38e67) 2019-05-30 Brian Douglass * Set the default dial background width to match the material design size (0eb59ca) 2019-05-09 Joan CiberSheep * Merge pull request #27 from ubports/xenial_-_fix-label (cc061ff) 2019-05-09 Brian Douglass * Removed problematic width setting in the Label element (ff72403) 2019-05-05 Brian Douglass * Fixed dp unit when HighDpiScaling is active (753661b) 2019-04-19 Brian Douglass * Merge pull request #24 from hummlbach/secondary_tertiary_foreground_color (d3982dc) 2019-04-19 Johannes Renkl * Added tertiaryForegroundColor and defined the foreground colors once (6204080) 2019-04-16 Michele * added secondaryForegroundColor (a05508f) 2019-04-01 Brian Douglass * Merge pull request #21 from ubports/Revert#15 (ce1056b) 2019-04-01 Joan CiberSheep * Restore Page background (20dfb98) 2019-03-26 Brian Douglass * Merge pull request #17 from ubports/SVGspinner (0421060) * Fixed the size and color of the svg spinner (5f06296) 2019-03-21 Joan CiberSheep * Add Scalable Spinner Icon (8f449db) 2019-03-20 Brian Douglass * Merge branch 'master' into xenial (f9e5df0) * Merge pull request #16 from ubports/SubtileTransitions (8def0e9) * Merge pull request #15 from ubports/NoPageBackground (efc8dfc) 2019-03-20 Joan CiberSheep * Simpler Transitions for StackView (b756125) * Remove Page background (bd803c9) 2019-03-12 Joan CiberSheep * Merge pull request #14 from ubports/xenial_-_respect-grid-unit (93d81ca) 2019-03-12 Brian Douglass * Merge pull request #13 from ubports/xenial_-_dark-theme-detection (a829d0d) * Respect the GRID_UNIT_PX env var (5a96fb5) 2019-03-10 Brian Douglass * Merge branch 'xenial' into xenial_-_dark-theme-detection (d816355) 2019-02-22 Brian Douglass * Added clickable setup for easier testing on device (8964f4f) * Added detection for the Ubuntu Touch dark theme (7c69328) 2018-05-18 Marius Gripsgard * Trigger rebuild (f7cb0a5) 2018-05-05 Marius Gripsgard * Merge pull request #3 from JBBgameich/patch-1 (37c2a31) 2018-05-04 JBB * Update control (6108356) * debian: Add qtdeclarative5-private-dev and qtdeclarative5-dev-tools deps (2c11e92) * debian: Add missing pkg-kde-tools dependency (a357f0d) 2018-05-04 Dan Chapman * Update debian/rules (d35f117) * Update control file (d2327c7) * Update changelog (ae9901d) * Add jenkins file (6b79168) 2018-02-23 Stefano Verzegnassi * Merge pull request #2 from JBBgameich/master (be8137a) 2018-02-23 JBBgameich * Add debian packaging (2449552) 2018-01-31 Stefano Verzegnassi * Use better 'maxWidth' values for Label (04760bb) 2018-01-30 Stefano Verzegnassi * Use 'backgroundColor' in Frame (d543ff0) * Added new 'textLevel' and 'textStyle' properties. Removed 'secondaryForegroundColor', as it's not necessary anymore (01d3f90) * Removed elevation effect from ToolBar (dad2975) * Added QQuickSuruUnits object. Use 'gu' and 'dp' for sizes. (01ee8f1) 2018-01-27 Stefano Verzegnassi * Fixed unreadable colors (aa10956) * Add not-commited 'EasingOutIn' property (c49645a) * Refactored animations (dc137fd) 2018-01-26 Stefano Verzegnassi * Refactored style engine (dea658d) 2018-01-25 Stefano Verzegnassi * removed comments (d6fbc69) 2018-01-23 Stefano Verzegnassi * Merge pull request #1 from sverzegnassi/new_elevation_effect (eb63123) 2018-01-22 Stefano Verzegnassi * New elevation effect, based on Suru specs (713d651) * [ProgressBar] Refreshed contentItem visuals. Removed Material style import. (2cf1784) 2018-01-19 Stefano Verzegnassi * Added missing DelayButton component (42b70f7) * clean up (38a3e59) * Fixed activeFocus visuals (ab37d82) * Restore 'quick-private' (fe6b99a) * [TEST] Toolbar: add elevation effect (cc409b0) * ComboBox: use same 'radius' value for both control and popup (672f4e6) * Indicators: use 'backgroundColor' for bg (467e45f) * Removed unused QT_PRIVATE imports (5d2fa58) * Removed QQuickSuruHighlightRectangle, replaced by a QML component (de55a84) * Button: use ElevationEffect (a34b670) 2018-01-18 Stefano Verzegnassi * Fixed typo in QQuickSuruHighlightRectangle (8256ae7) * Enlarged Menu radius + added some padding to prevent MenuItem overlapping (de834ec) * Tumbler visuals (7c1fdc3) * clean up (c8da191) * Removed quicktemplates2-private dependency (20bd06c) * Use positiveColor for indicators 'checked' state (7b9a4fd) * SwitchIndicator a11y (5904a96) * Replaced blue with link-color from Vanilla Framework. Ref. https://github.com/ubuntudesign/vanilla-design/commit/5d6c3f3db27e4bc1ca598996d70880a3119bf732 (e94cff3) 2018-01-17 Stefano Verzegnassi * Initial commit (83afea5) qqc2-suru-style-0.20230206/LICENSE.GPL-2000066400000000000000000000432541437021036500167060ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. qqc2-suru-style-0.20230206/LICENSE.LGPL-3000066400000000000000000000164221437021036500170200ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License. “The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”. The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. qqc2-suru-style-0.20230206/README.md000066400000000000000000000001121437021036500163620ustar00rootroot00000000000000# qqc2-suru-style Suru Style for QtQuick Controls 2. Qt 5.9 is required. qqc2-suru-style-0.20230206/clickable.json000066400000000000000000000007621437021036500177220ustar00rootroot00000000000000{ "template": "qmake", "dependencies_target": [ "qtquickcontrols2-5-dev", "qtquickcontrols2-5-private-dev", "qtdeclarative5-dev" ], "scripts": { "push": "adb push build/arm-linux-gnueabihf/app/install/usr/lib/arm-linux-gnueabihf/qt5/qml/QtQuick/Controls.2/Suru/ /home/phablet/ && adb shell \"sudo cp -r /home/phablet/Suru/ /usr/lib/arm-linux-gnueabihf/qt5/qml/QtQuick/Controls.2/\"" }, "postbuild": "cp ${ROOT}/manifest.json ${INSTALL_DIR}", "default": "build push" } qqc2-suru-style-0.20230206/debian/000077500000000000000000000000001437021036500163335ustar00rootroot00000000000000qqc2-suru-style-0.20230206/debian/Jenkinsfile000066400000000000000000000001011437021036500205070ustar00rootroot00000000000000@Library('ubports-build-tools') _ buildAndProvideDebianPackage() qqc2-suru-style-0.20230206/debian/changelog000066400000000000000000000047741437021036500202210ustar00rootroot00000000000000qqc2-suru-style (0.20230206) unstable; urgency=medium * Upstream-provided Debian package for qqc2-suru-style. See upstream ChangeLog for recent changes. -- UBports developers Mon, 06 Feb 2023 15:38:45 +0100 qqc2-suru-style (0.20220527) xenial; urgency=medium [ Daniel Kutka ] * Add support for icons and 5.12 fixes (#56) * Fix Cannot override FINAL property error for sliders * Add support for icons for Buttons and Delegates * Fix icon colors [ Rodney Dawes ] * Move the internal implementation items to impl subdir Fixes #53 * Add missing QtQuick.Controls 2 import [ Brian Douglass ] * Fixes for Qt 5.12 * Fixed the combo box's editable state * Added nasty hack to allow clickable to work again * Follow upstream's default for word wrap * Set the default dial background width to match the material design size * Removed problematic width setting in the Label element * Fixed dp unit when HighDpiScaling is active * Fixed the size and color of the svg spinner * Respect the GRID_UNIT_PX env var * Added clickable setup for easier testing on device * Added detection for the Ubuntu Touch dark theme [ dano6 ] * Fix ComboBox for 5.12 * Port CheckIndicator and SpinBox to QT 5.12 [ Marius Gripsgard ] * debian/rules: allow building with crossbuilder [ Alberto Mardegan ] * debian/rules: do not override existing QT_SELECT value This allows the project to be build in crossbuilder. [ Johannes Renkl ] * Removed type registration of Label (#41) * Added tertiaryForegroundColor and defined the foreground colors once [ Luca Weiss ] * Fix missing .qml files in Qt 5.9 (#40) * Port C++ parts to Qt 5.12 (#38) * Add some QML type registrations [ Joan CiberSheep ] * Set Elevation shadow to grey * Fix to Sliders handler light and dark mode * Restore Page background * Add Scalable Spinner Icon * Simpler Transitions for StackView * Remove Page background [ Chris Clime ] * add foregroundColor to SpinBox [ Michele ] * added secondaryForegroundColor [ JBB ] * Update control * debian: Add qtdeclarative5-private-dev and qtdeclarative5-dev-tools deps * debian: Add missing pkg-kde-tools dependency -- Guido Berhoerster Fri, 27 May 2022 10:23:54 +0200 qqc2-suru-style (0.20180223ubuntu1) xenial; urgency=medium [ JBBgameich ] * Initial release [ Dan Chapman ] * Add jenkinsfile and import to ubports repo -- Dan Chapman Fri, 04 May 2018 16:03:49 +0000 qqc2-suru-style-0.20230206/debian/compat000066400000000000000000000000031437021036500175320ustar00rootroot0000000000000010 qqc2-suru-style-0.20230206/debian/control000066400000000000000000000015071437021036500177410ustar00rootroot00000000000000Source: qqc2-suru-style Section: libs Priority: optional Maintainer: UBports developers Build-Depends: debhelper (>= 9), qtquickcontrols2-5-dev, qtquickcontrols2-5-private-dev, qtdeclarative5-dev, qtdeclarative5-private-dev, qtdeclarative5-dev-tools, qtbase5-dev, qtbase5-private-dev, qt5-qmake, pkg-kde-tools Standards-Version: 4.1.3 Homepage: https://gitlab.com/ubports/core/qqc2-suru-style Vcs-Browser: https://gitlab.com/ubports/core/qqc2-suru-style Vcs-Git: https://gitlab.com/ubports/core/qqc2-suru-style.git Package: qml-module-qtquick-controls2-suru Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${qmlc:Depends} Description: Suru style for QtQuick Controls 2 qqc2-suru-style-0.20230206/debian/copyright000066400000000000000000000034551437021036500202750ustar00rootroot00000000000000Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: qqc2-suru-style Source: https://github.com/sverzegnassi/qqc2-suru-style Files: * Copyright: 2017-2018 Stefano Verzegnassi License: GPL-2 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. Files: debian/* Copyright: 2018 JBBgameich License: GPL-2 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. qqc2-suru-style-0.20230206/debian/rules000077500000000000000000000001651437021036500174150ustar00rootroot00000000000000#!/usr/bin/make -f export QT_SELECT ?= qt5 %: dh $@ --with pkgkde_symbolshelper override_dh_auto_configure: qmake qqc2-suru-style-0.20230206/debian/source/000077500000000000000000000000001437021036500176335ustar00rootroot00000000000000qqc2-suru-style-0.20230206/debian/source/format000066400000000000000000000000151437021036500210420ustar00rootroot000000000000003.0 (native) qqc2-suru-style-0.20230206/manifest.json000066400000000000000000000004641437021036500176160ustar00rootroot00000000000000{ "name": "suru-style", "description": "This is a nasty hack to allow clickable to compile & install suru style", "architecture": "@CLICK_ARCH@", "title": "suru-style", "version": "0.0.0", "maintainer": "Brian Douglass ", "framework" : "ubuntu-sdk-16.04" } qqc2-suru-style-0.20230206/qqc2-suru/000077500000000000000000000000001437021036500167535ustar00rootroot00000000000000qqc2-suru-style-0.20230206/qqc2-suru/ApplicationWindow.qml000066400000000000000000000041511437021036500231220ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.ApplicationWindow { id: window color: window.Suru.backgroundColor overlay.modal: Rectangle { color: window.Suru.overlayColor Behavior on opacity { NumberAnimation { duration: window.Suru.animations.FastDuration } } } overlay.modeless: Rectangle { color: window.Suru.overlayColor Behavior on opacity { NumberAnimation { duration: window.Suru.animations.FastDuration } } } Rectangle { parent: window.activeFocusControl anchors.centerIn: parent width: parent ? parent.width + (window.Suru.units.dp(4) * 2) : 0 height: parent ? parent.height + 8 : 0 visible: parent && !!parent.useSystemFocusVisuals && !!parent.visualFocus color: "transparent" border { width: window.Suru.units.dp(2) color: window.Suru.activeFocusColor } } } qqc2-suru-style-0.20230206/qqc2-suru/BusyIndicator.qml000066400000000000000000000057631437021036500222600ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.BusyIndicator { id: control implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding contentItem: Image { id: image width: control.Suru.units.gu(6) height: control.Suru.units.gu(6) sourceSize.width: control.Suru.units.gu(6) sourceSize.height: control.Suru.units.gu(6) source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Suru/assets/spinner.svg" opacity: running ? 1.0 : 0.0 RotationAnimator on rotation { running: control.visible && control.running from: 0 to: 360 loops: Animation.Infinite duration: control.Suru.animations.SleepyDuration } ShaderEffect { id: colorizedImage objectName: "shader" anchors.fill: parent visible: image.status == Image.Ready property Image source: image property color keyColorOut: control.Suru.highlightColor property color keyColorIn: "#808080" property real threshold: 0.1 fragmentShader: " varying highp vec2 qt_TexCoord0; uniform sampler2D source; uniform highp vec4 keyColorOut; uniform highp vec4 keyColorIn; uniform lowp float threshold; uniform lowp float qt_Opacity; void main() { lowp vec4 sourceColor = texture2D(source, qt_TexCoord0); gl_FragColor = mix(keyColorOut * vec4(sourceColor.a), sourceColor, step(threshold, distance(sourceColor.rgb / sourceColor.a, keyColorIn.rgb))) * qt_Opacity; }" } } } qqc2-suru-style-0.20230206/qqc2-suru/Button.qml000066400000000000000000000100001437021036500207300ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import "impl" T.Button { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) topPadding: control.Suru.units.gu(1) bottomPadding: control.Suru.units.gu(1) property bool useSystemFocusVisuals: true opacity: control.enabled ? 1.0 : 0.5 icon.width: 24 icon.height: 24 icon.color: control.flat && control.highlighted ? control.Suru.highlightColor : !control.flat && control.highlighted ? control.Suru.backgroundColor : control.Suru.foregroundColor contentItem: IconLabel { spacing: control.spacing mirrored: control.mirrored display: control.display icon: control.icon text: control.text font: control.font color: control.flat && control.highlighted ? control.Suru.highlightColor : !control.flat && control.highlighted ? control.Suru.backgroundColor : control.Suru.foregroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } background: Rectangle { implicitWidth: control.Suru.units.gu(8) implicitHeight: control.Suru.units.gu(4) property color __normalColor: (control.highlighted || control.checked) && !control.flat ? control.Suru.highlightColor : control.flat ? control.Suru.backgroundColor : control.Suru.secondaryBackgroundColor color: control.down ? Qt.darker(__normalColor, 1.2) : control.hovered ? Qt.darker(__normalColor, 1.1) : __normalColor radius: control.Suru.units.dp(4) border.width: (control.highlighted || control.checked || control.flat) ? 0 : 1 border.color: control.Suru.neutralColor layer.enabled: (control.highlighted || control.checked) && !control.flat layer.effect: ElevationEffect { elevation: !control.down ? 2 : 3 } Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } qqc2-suru-style-0.20230206/qqc2-suru/CheckBox.qml000066400000000000000000000053011437021036500211530ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.CheckBox { id: control property bool useSystemFocusVisuals: true implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: control.Suru.units.gu(0.5) spacing: control.Suru.units.gu(1.5) opacity: control.enabled ? 1.0 : 0.5 indicator: CheckIndicator { x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } contentItem: Text { leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 text: control.text font: control.font elide: Text.ElideRight visible: control.text horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter color: control.Suru.foregroundColor } } qqc2-suru-style-0.20230206/qqc2-suru/CheckDelegate.qml000066400000000000000000000066651437021036500221530ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import "impl" T.CheckDelegate { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset topPadding: control.Suru.units.gu(2) bottomPadding: control.Suru.units.gu(2) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) spacing: control.Suru.units.gu(1.5) opacity: control.enabled ? 1.0 : 0.5 icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor indicator: CheckIndicator { x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } contentItem: IconLabel { leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing spacing: control.spacing mirrored: control.mirrored display: control.display alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft icon: control.icon text: control.text font: control.font color: control.Suru.foregroundColor } background: Rectangle { implicitHeight: 56 color: control.Suru.backgroundColor HighlightFocusRectangle { control: control width: parent.width height: parent.height } Rectangle { anchors.bottom: parent.bottom width: parent.width height: control.Suru.units.dp(1) color: control.Suru.neutralColor } } } qqc2-suru-style-0.20230206/qqc2-suru/ComboBox.qml000066400000000000000000000133201437021036500211750ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.ComboBox { id: control property bool useSystemFocusVisuals: true implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset spacing: control.Suru.units.gu(2) topPadding: control.Suru.units.gu(0.5) bottomPadding: control.Suru.units.gu(0.5) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) opacity: enabled ? 1.0 : 0.5 delegate: ItemDelegate { width: control.popup.width height: control.Suru.units.gu(4) + control.topPadding + control.bottomPadding text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData highlighted: control.highlightedIndex === index hoverEnabled: control.hoverEnabled } indicator: ColorImage { x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding y: control.topPadding + (control.availableHeight - height) / 2 width: control.Suru.units.gu(2) height: control.Suru.units.gu(2) color: control.Suru.foregroundColor source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Suru/assets/down.png" sourceSize.width: width sourceSize.height: height } contentItem: T.TextField { leftPadding: control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0 rightPadding: !control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0 text: control.editable ? control.editText : control.displayText enabled: control.editable autoScroll: control.editable readOnly: control.down inputMethodHints: control.inputMethodHints validator: control.validator font: control.font color: control.Suru.foregroundColor selectionColor: Suru.highlightColor selectedTextColor: 'white' horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter cursorDelegate: CursorDelegate { } } background: Rectangle { implicitWidth: Math.max(control.Suru.units.gu(20), parent.width * 0.45) implicitHeight: control.Suru.units.gu(4) radius: control.Suru.units.dp(4) border.width: control.flat ? 0 : 1 border.color: control.pressed || popup.visible || control.visualFocus ? control.Suru.highlightColor : control.Suru.neutralColor color: control.pressed || popup.visible ? Qt.darker(control.Suru.secondaryBackgroundColor, 1.1) : control.hovered ? control.Suru.secondaryBackgroundColor : control.Suru.backgroundColor visible: !control.flat || control.pressed || control.hovered || control.visualFocus Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } popup: T.Popup { //y: control.height width: control.width implicitHeight: Math.min(control.Suru.units.gu(48), contentItem.implicitHeight) topMargin: control.Suru.units.gu(1) bottomMargin: control.Suru.units.gu(1) padding: control.Suru.units.dp(1) Suru.theme: control.Suru.theme contentItem: ListView { clip: true implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex highlightRangeMode: ListView.ApplyRange highlightMoveDuration: 0 T.ScrollIndicator.vertical: ScrollIndicator { } } background: Rectangle { color: control.Suru.secondaryBackgroundColor // border.color: control.Suru.neutralColor // border.width: 1 radius: control.Suru.units.dp(4) layer.enabled: true layer.effect: ElevationEffect { elevation: 3 } } } } qqc2-suru-style-0.20230206/qqc2-suru/DelayButton.qml000066400000000000000000000100721437021036500217200ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.DelayButton { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) topPadding: control.Suru.units.gu(1) bottomPadding: control.Suru.units.gu(1) property bool useSystemFocusVisuals: true opacity: control.enabled ? 1.0 : 0.5 transition: Transition { NumberAnimation { duration: control.delay * (control.pressed ? 1.0 - control.progress : 0.3 * control.progress) } } icon.width: 24 icon.height: 24 icon.color: control.checked ? control.Suru.backgroundColor : control.Suru.foregroundColor contentItem: IconLabel { spacing: control.spacing mirrored: control.mirrored display: control.display icon: control.icon text: control.text font: control.font color: control.checked ? control.Suru.backgroundColor : control.Suru.foregroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } background: Rectangle { id: controlBg implicitWidth: control.Suru.units.gu(8) implicitHeight: control.Suru.units.gu(4) property color __normalColor: control.checked ? control.Suru.highlightColor : control.Suru.secondaryBackgroundColor color: control.down ? Qt.darker(__normalColor, 1.2) : control.hovered ? Qt.darker(__normalColor, 1.1) : __normalColor radius: control.Suru.units.dp(4) border.width: control.checked ? 0 : 1 border.color: control.Suru.neutralColor Item { width: parent.width * control.progress height: control.Suru.units.dp(3) anchors.bottom: parent.bottom clip: true Rectangle { visible: !control.checked width: parent.width + (control.progress == 1.0 ? 0 : controlBg.radius) height: parent.height + controlBg.radius radius: controlBg.radius color: control.Suru.highlightColor anchors.bottom: parent.bottom } } Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } qqc2-suru-style-0.20230206/qqc2-suru/Dial.qml000066400000000000000000000104711437021036500203420ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import QtGraphicalEffects 1.0 T.Dial { id: control implicitWidth: control.Suru.units.gu(24) implicitHeight: control.Suru.units.gu(24) opacity: control.enabled ? 1.0 : 0.5 background: Rectangle { x: control.width / 2 - width / 2 y: control.height / 2 - height / 2 width: Math.max(64, Math.min(control.width, control.height)) height: width; radius: width / 2 color: "transparent" border.color: control.Suru.neutralColor border.width: control.Suru.units.dp(3) // http://stackoverflow.com/questions/22873550/how-to-create-a-circular-progress-bar-in-pure-qmljs ConicalGradient { source: control.background anchors.fill: parent antialiasing: true // Get ConicalGradient starting from the right position angle: -140 gradient: control.position == 1.0 ? pos100Gradient : stdGradient Gradient { id: stdGradient GradientStop { position: 0.00; color: control.Suru.highlightColor } GradientStop { position: control.position * 280 / 360; color: control.Suru.highlightColor } GradientStop { position: control.position * 280 / 360 + 0.0000000000001; color: "transparent" } GradientStop { position: 1.00 * 280 / 360; color: "transparent" } } Gradient { id: pos100Gradient GradientStop { position: 0.00; color: control.Suru.highlightColor } GradientStop { position: control.position * 280 / 360; color: control.Suru.highlightColor } GradientStop { position: control.position * 280 / 360 + 0.0000000000001; color: "transparent" } GradientStop { position: 1.00; color: "transparent" } } } } handle: Rectangle { implicitWidth: control.Suru.units.gu(2) implicitHeight: control.Suru.units.gu(2) radius: width * 0.5 x: background.x + background.width / 2 - handle.width / 2 y: background.y + background.height / 2 - handle.height / 2 color: control.pressed ? control.Suru.highlightColor : Qt.darker(control.Suru.neutralColor, control.hovered ? 1.1 : 1.0) Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } transform: [ Translate { y: -Math.min(background.width, background.height) * 0.4 + handle.height / 2 }, Rotation { angle: control.angle origin.x: handle.width / 2 origin.y: handle.height / 2 } ] Rectangle { anchors { fill: parent; margins: -4 } radius: width * 0.5 visible: control.visualFocus border.width: control.Suru.units.dp(2) border.color: control.Suru.activeFocusColor color: "transparent" } } } qqc2-suru-style-0.20230206/qqc2-suru/Dialog.qml000066400000000000000000000072211437021036500206670ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Templates 2.12 as T import "impl" T.Dialog { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, header && header.visible ? header.implicitWidth : 0, footer && footer.visible ? footer.implicitWidth : 0, contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0) implicitHeight: Math.max(background ? background.implicitHeight : 0, (header && header.visible ? header.implicitHeight + spacing : 0) + (footer && footer.visible ? footer.implicitHeight + spacing : 0) + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0)) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) topPadding: control.Suru.units.gu(1) bottomPadding: control.Suru.units.gu(1) enter: Transition { // grow_fade_in NumberAnimation { property: "scale"; from: 0.91; to: 1.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.SnapDuration } NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.SnapDuration } } exit: Transition { // fade_out NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.SnapDuration } } background: Rectangle { color: control.Suru.backgroundColor radius: control.Suru.units.dp(4) // border.width: 1 // border.color: control.Suru.neutralColor layer.enabled: true layer.effect: ElevationEffect { elevation: 3 } } header: Label { text: control.title visible: control.title elide: Label.ElideRight topPadding: control.Suru.units.gu(3) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) Suru.textLevel: Suru.HeadingThree Suru.textStyle: Suru.PrimaryText } footer: DialogButtonBox { visible: count > 0 } } qqc2-suru-style-0.20230206/qqc2-suru/DialogButtonBox.qml000066400000000000000000000047541437021036500225440ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls 2.12 import QtQuick.Controls.Suru 2.2 T.DialogButtonBox { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) spacing: control.Suru.units.gu(1) padding: control.Suru.units.gu(2) topPadding: position === T.DialogButtonBox.Footer ? control.Suru.units.gu(1) : control.Suru.units.gu(2) bottomPadding: position === T.DialogButtonBox.Header ? control.Suru.units.gu(1) : control.Suru.units.gu(2) alignment: Qt.AlignRight delegate: Button { width: implicitWidth//control.count === 1 ? control.availableWidth / 2 : undefined highlighted: true flat: true font.capitalization: Font.AllUppercase font.weight: Font.Normal } contentItem: ListView { implicitWidth: contentWidth implicitHeight: control.Suru.units.gu(4) model: control.contentModel spacing: control.spacing orientation: ListView.Horizontal boundsBehavior: Flickable.StopAtBounds snapMode: ListView.SnapToItem } } qqc2-suru-style-0.20230206/qqc2-suru/Drawer.qml000066400000000000000000000057361437021036500207250ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.Drawer { id: control parent: T.ApplicationWindow.overlay implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) topPadding: control.edge === Qt.BottomEdge leftPadding: control.edge === Qt.RightEdge rightPadding: control.edge === Qt.LeftEdge bottomPadding: control.edge === Qt.TopEdge enter: Transition { NumberAnimation { duration: control.Suru.animations.BriskDuration; easing: control.Suru.animations.EasingInOut } } exit: Transition { NumberAnimation { duration: control.Suru.animations.BriskDuration; easing: control.Suru.animations.EasingInOut } } background: Rectangle { color: control.Suru.secondaryBackgroundColor Rectangle { readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge x: control.edge === Qt.LeftEdge ? parent.width - control.Suru.units.dp(1) : 0 y: control.edge === Qt.TopEdge ? parent.height - control.Suru.units.dp(1) : 0 width: horizontal ? control.Suru.units.dp(1) : parent.width height: horizontal ? parent.height : control.Suru.units.dp(1) color: control.Suru.neutralColor } layer.enabled: control.position > 0 layer.effect: ElevationEffect { elevation: !interactive && !dim ? 0 : 3 } } } qqc2-suru-style-0.20230206/qqc2-suru/Frame.qml000066400000000000000000000037541437021036500205310ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.Frame { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) padding: 20 spacing: 16 background: Rectangle { anchors.fill: parent anchors.margins: -1 radius: 2 color: control.Suru.backgroundColor border.width: 1 border.color: control.Suru.neutralColor } } qqc2-suru-style-0.20230206/qqc2-suru/GroupBox.qml000066400000000000000000000053341437021036500212400ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Templates 2.12 as T T.GroupBox { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, label ? label.implicitWidth + leftPadding + rightPadding : 0, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) spacing: control.Suru.units.gu(1.5) padding: control.Suru.units.gu(2) topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0) Suru.textStyle: Suru.SecondaryText label: Text { width: control.availableWidth text: control.title elide: Text.ElideRight horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter font: control.font color: control.Suru.foregroundColor } background: Rectangle { y: control.topPadding - control.padding width: parent.width height: parent.height - control.topPadding + control.padding radius: control.Suru.units.dp(2) color: control.Suru.backgroundColor border.width: control.Suru.units.dp(1) border.color: control.Suru.neutralColor } } qqc2-suru-style-0.20230206/qqc2-suru/ItemDelegate.qml000066400000000000000000000063201437021036500220200ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import "impl" T.ItemDelegate { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset topPadding: control.Suru.units.gu(2) bottomPadding: control.Suru.units.gu(2) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) spacing: control.Suru.units.gu(1.5) opacity: control.enabled ? 1.0 : 0.5 icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor contentItem: IconLabel { leftPadding: !control.mirrored ? 0 : (control.indicator ? control.indicator.width : 0) + control.spacing rightPadding: control.mirrored ? 0 : (control.indicator ? control.indicator.width : 0) + control.spacing spacing: control.spacing mirrored: control.mirrored display: control.display alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft icon: control.icon text: control.text font: control.font color: control.Suru.foregroundColor } background: Rectangle { implicitHeight: control.Suru.units.gu(7) color: control.Suru.backgroundColor HighlightFocusRectangle { control: control width: parent.width height: parent.height } Rectangle { anchors.bottom: parent.bottom width: parent.width height: control.Suru.units.dp(1) color: control.Suru.neutralColor } } } qqc2-suru-style-0.20230206/qqc2-suru/Label.qml000066400000000000000000000041121437021036500205030ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.Label { id: control opacity: enabled ? 1.0 : 0.5 color: control.Suru.foregroundColor linkColor: control.Suru.highlightColor font: { switch (control.Suru.textLevel) { case Suru.HeadingOne: return control.Suru.units.fontHeadingOne case Suru.HeadingTwo: return control.Suru.units.fontHeadingTwo case Suru.HeadingThree: return control.Suru.units.fontHeadingThree case Suru.Paragraph: return control.Suru.units.fontParagraph case Suru.Small: return control.Suru.units.fontSmall case Suru.Caption: return control.Suru.units.fontCaption case Suru.CodeBlock: return control.Suru.units.fontCodeBlock default: return control.Suru.units.fontParagraph } } } qqc2-suru-style-0.20230206/qqc2-suru/Menu.qml000066400000000000000000000063361437021036500204020ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.Menu { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding margins: control.Suru.units.gu(1) // Expressed in dp, since it matches background radius size topPadding: control.Suru.units.dp(4) bottomPadding: control.Suru.units.dp(4) transformOrigin: Item.Top enter: Transition { // grow_fade_in NumberAnimation { property: "scale"; from: 0.91; to: 1.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.FastDuration } NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.FastDuration } } exit: Transition { // fade_out NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.FastDuration } } delegate: MenuItem { } contentItem: ListView { implicitHeight: contentHeight model: control.contentModel // TODO: improve this? interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false clip: true keyNavigationWraps: false currentIndex: -1 ScrollIndicator.vertical: ScrollIndicator {} } background: Rectangle { implicitWidth: control.Suru.units.gu(24) implicitHeight: control.Suru.units.gu(6) radius: control.Suru.units.dp(4) color: control.Suru.backgroundColor // border.color: control.Suru.neutralColor // border.width: 1 layer.enabled: true layer.effect: ElevationEffect { elevation: 3 } } } qqc2-suru-style-0.20230206/qqc2-suru/MenuItem.qml000066400000000000000000000065151437021036500212200ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import "impl" T.MenuItem { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) topPadding: control.Suru.units.gu(2) - control.Suru.units.dp(1) bottomPadding: control.Suru.units.gu(2) + control.Suru.units.dp(1) spacing: control.Suru.units.gu(2) opacity: control.enabled ? 1.0 : 0.5 icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor contentItem: IconLabel { leftPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0 spacing: control.spacing mirrored: control.mirrored display: control.display alignment: Qt.AlignLeft icon: control.icon text: control.text font: control.font color: control.Suru.foregroundColor } indicator: CheckIndicator { x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 visible: control.checkable control: control } background: Rectangle { implicitWidth: control.Suru.units.gu(24) implicitHeight: control.Suru.units.gu(6) color: control.Suru.backgroundColor HighlightFocusRectangle { control: control width: parent.width height: parent.height } } } qqc2-suru-style-0.20230206/qqc2-suru/MenuSeparator.qml000066400000000000000000000034421437021036500222560ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.MenuSeparator { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) topPadding: control.Suru.units.gu(2) bottomPadding: control.Suru.units.gu(2) contentItem: Rectangle { implicitWidth: control.Suru.units.gu(24) implicitHeight: control.Suru.units.dp(1) color: control.Suru.neutralColor } } qqc2-suru-style-0.20230206/qqc2-suru/Page.qml000066400000000000000000000043561437021036500203520ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.Page { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, Math.max(contentWidth, header && header.visible ? header.implicitWidth : 0, footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding + (header && header.visible ? header.implicitHeight + spacing : 0) + (footer && footer.visible ? footer.implicitHeight + spacing : 0)) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) background: Rectangle { color: control.Suru.backgroundColor } } qqc2-suru-style-0.20230206/qqc2-suru/PageIndicator.qml000066400000000000000000000045401437021036500222020ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.PageIndicator { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) padding: control.Suru.units.gu(0.5) spacing: control.Suru.units.gu(0.5) delegate: Rectangle { implicitWidth: control.Suru.units.gu(1) implicitHeight: control.Suru.units.gu(1) radius: width / 2 color: index == control.currentIndex ? control.Suru.highlightColor : pressed ? control.Suru.neutralColor : "transparent" border { width: index == control.currentIndex ? 0 : control.Suru.units.dp(1) color: index == control.currentIndex ? control.Suru.highlightColor : control.Suru.neutralColor } } contentItem: Row { spacing: control.spacing Repeater { model: control.count delegate: control.delegate } } } qqc2-suru-style-0.20230206/qqc2-suru/Pane.qml000066400000000000000000000035361437021036500203600ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.Pane { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) padding: control.Suru.units.gu(2) background: Rectangle { color: control.Suru.backgroundColor } } qqc2-suru-style-0.20230206/qqc2-suru/Popup.qml000066400000000000000000000051761437021036500206020ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.Popup { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) padding: control.Suru.units.gu(2) enter: Transition { // grow_fade_in NumberAnimation { property: "scale"; from: 0.91; to: 1.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.FastDuration } NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.FastDuration } } exit: Transition { // fade_out NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing: control.Suru.animations.EasingIn; duration: control.Suru.animations.FastDuration } } background: Rectangle { color: control.Suru.backgroundColor layer.enabled: true layer.effect: ElevationEffect { elevation: 3 } } } qqc2-suru-style-0.20230206/qqc2-suru/ProgressBar.qml000066400000000000000000000057771437021036500217370ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.ProgressBar { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) opacity: control.enabled ? 1.0 : 0.5 contentItem: Item { id: contentItem clip: true Rectangle { id: thumb implicitWidth: (control.indeterminate ? 0.25 : control.position) * contentItem.width implicitHeight: control.Suru.units.dp(3) color: control.Suru.highlightColor SequentialAnimation { running: control.indeterminate loops: Animation.Infinite XAnimator { target: thumb from: -thumb.width; to: contentItem.width duration: control.Suru.animations.SleepyDuration easing: control.Suru.animations.EasingInOut } XAnimator { target: thumb from: contentItem.width to: -thumb.width duration: control.Suru.animations.SleepyDuration easing: control.Suru.animations.EasingInOut } } } } background: Rectangle { implicitWidth: control.Suru.units.gu(32) implicitHeight: control.Suru.units.dp(3) x: control.leftPadding y: control.topPadding + (control.availableHeight - height) / 2 width: control.availableWidth height: control.Suru.units.dp(3) color: control.Suru.neutralColor } } qqc2-suru-style-0.20230206/qqc2-suru/RadioButton.qml000066400000000000000000000055071437021036500217270ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.RadioButton { id: control property bool useSystemFocusVisuals: true implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: control.Suru.units.gu(0.5) spacing: control.Suru.units.gu(1.5) opacity: control.enabled ? 1.0 : 0.5 indicator: RadioIndicator { x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor contentItem: IconLabel { leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 spacing: control.spacing mirrored: control.mirrored display: control.display icon: control.icon text: control.text font: control.font color: control.Suru.foregroundColor } } qqc2-suru-style-0.20230206/qqc2-suru/RadioDelegate.qml000066400000000000000000000066061437021036500221670ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Templates 2.12 as T import "impl" T.RadioDelegate { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset topPadding: control.Suru.units.gu(2) bottomPadding: control.Suru.units.gu(2) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) spacing: control.Suru.units.gu(1.5) opacity: control.enabled ? 1.0 : 0.5 icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor contentItem: IconLabel { leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing spacing: control.spacing mirrored: control.mirrored display: control.display alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft icon: control.icon text: control.text font: control.font color: control.Suru.foregroundColor } indicator: RadioIndicator { x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding y: control.topPadding + (control.availableHeight - height) / 2 control: control } background: Rectangle { implicitHeight: control.Suru.units.gu(7) color: control.Suru.backgroundColor HighlightFocusRectangle { control: control width: parent.width height: parent.height } Rectangle { anchors.bottom: parent.bottom width: parent.width height: control.Suru.units.dp(1) color: control.Suru.neutralColor } } } qqc2-suru-style-0.20230206/qqc2-suru/RangeSlider.qml000066400000000000000000000130561437021036500216720ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.RangeSlider { id: control implicitWidth: control.horizontal ? control.Suru.units.gu(32) : control.Suru.units.gu(5) implicitHeight: control.horizontal ? control.Suru.units.gu(5) : control.Suru.units.gu(32) padding: control.Suru.units.gu(1) opacity: control.enabled ? 1.0 : 0.5 first.handle: Rectangle { implicitHeight: control.Suru.units.gu(2) implicitWidth: control.Suru.units.gu(2) x: control.leftPadding + (control.horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height)) border.width: activeFocus ? control.Suru.units.dp(2) : control.Suru.units.dp(1) //(first.pressed ? 1 : 0) border.color: activeFocus ? control.Suru.activeFocusColor : control.Suru.neutralColor radius: control.Suru.units.dp(4) color: first.pressed ? Qt.darker(control.Suru.secondaryBackgroundColor, 1.1) : first.hovered ? control.Suru.secondaryBackgroundColor : control.Suru.backgroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } layer.enabled: true layer.effect: ElevationEffect { elevation: !first.pressed ? 2 : 3 } } second.handle: Rectangle { implicitHeight: control.Suru.units.gu(2) implicitWidth: control.Suru.units.gu(2) x: control.leftPadding + (control.horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height)) border.width: activeFocus ? control.Suru.units.dp(2) : control.Suru.units.dp(1) //(second.pressed ? 1 : 0) border.color: activeFocus ? control.Suru.activeFocusColor : control.Suru.neutralColor radius: control.Suru.units.dp(4) color: second.pressed ? Qt.darker(control.Suru.secondaryBackgroundColor, 1.1) : second.hovered ? control.Suru.secondaryBackgroundColor : control.Suru.backgroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } layer.enabled: true layer.effect: ElevationEffect { elevation: !second.pressed ? 2 : 3 } } background: Item { implicitWidth: control.horizontal ? control.Suru.units.gu(48) : control.Suru.units.gu(2) implicitHeight: control.horizontal ? control.Suru.units.gu(2) : control.Suru.units.gu(48) x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0) width: control.horizontal ? control.availableWidth : implicitWidth height: control.horizontal ? implicitHeight : control.availableHeight scale: control.horizontal && control.mirrored ? -1 : 1 Rectangle { x: control.horizontal ? 0 : (parent.width - width) / 2 y: control.horizontal ? (parent.height - height) / 2 : 0 width: control.horizontal ? parent.width : control.Suru.units.dp(3) height: !control.horizontal ? parent.height : control.Suru.units.dp(3) color: control.Suru.neutralColor } Rectangle { x: control.horizontal ? control.first.position * parent.width : (parent.width - width) / 2 y: control.horizontal ? (parent.height - height) / 2 : control.second.visualPosition * parent.height width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width : control.Suru.units.dp(3) height: !control.horizontal ? control.second.position * parent.height - control.first.position * parent.height : control.Suru.units.dp(3) color: control.Suru.highlightColor } } } qqc2-suru-style-0.20230206/qqc2-suru/RoundButton.qml000066400000000000000000000067451437021036500217650ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import "impl" // TODO: highlighted/checked visuals for flat button style T.RoundButton { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: control.Suru.units.gu(2) property bool useSystemFocusVisuals: true opacity: enabled ? 1.0 : 0.5 icon.width: 24 icon.height: 24 icon.color: control.flat && control.highlighted ? control.Suru.highlightColor : !control.flat && control.highlighted ? control.Suru.backgroundColor : control.Suru.foregroundColor contentItem: IconLabel { spacing: control.spacing mirrored: control.mirrored display: control.display icon: control.icon text: control.text font: control.font color: control.flat && control.highlighted ? control.Suru.highlightColor : !control.flat && control.highlighted ? control.Suru.backgroundColor : control.Suru.foregroundColor } background: Rectangle { implicitWidth: control.Suru.units.gu(6) implicitHeight: control.Suru.units.gu(6) radius: control.radius property color __normalColor: (control.highlighted || control.checked) && !control.flat ? control.Suru.highlightColor : control.Suru.backgroundColor color: control.down ? Qt.darker(__normalColor, 1.2) : control.hovered ? Qt.darker(__normalColor, 1.1) : __normalColor border.width: !control.flat && (control.highlighted || control.checked) ? 0 : 1 border.color: control.Suru.neutralColor layer.enabled: !control.flat layer.effect: ElevationEffect { elevation: !control.down ? 2 : 3 } ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } qqc2-suru-style-0.20230206/qqc2-suru/ScrollBar.qml000066400000000000000000000065221437021036500213560ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.ScrollBar { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) visible: control.policy !== T.ScrollBar.AlwaysOff // TODO: arrows contentItem: Rectangle { implicitWidth: control.interactive ? control.Suru.units.gu(2) : control.Suru.units.dp(3) implicitHeight: control.interactive ? control.Suru.units.gu(2) : control.Suru.units.dp(3) color: control.pressed ? Qt.darker(control.Suru.highlightColor, 1.2) : control.interactive && control.hovered ? Qt.darker(control.Suru.highlightColor, 1.1) : control.Suru.highlightColor opacity: 0.0 radius: control.Suru.units.dp(2) } background: Rectangle { implicitWidth: control.interactive ? control.Suru.units.gu(2) : 0 color: control.Suru.neutralColor visible: control.size < 1.0 opacity: 0.0 } states: [ State { name: "active" when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0) } ] transitions: [ Transition { to: "active" ParallelAnimation { NumberAnimation { targets: contentItem; property: "opacity"; to: 1.0; duration: control.Suru.animations.BriskDuration; easing: control.Suru.animations.EasingIn } NumberAnimation { targets: background; property: "opacity"; to: .5; duration: control.Suru.animations.BriskDuration; easing: control.Suru.animations.EasingIn } } }, Transition { from: "active" SequentialAnimation { PauseAnimation { duration: 3000 } NumberAnimation { targets: [contentItem, background]; property: "opacity"; to: 0.0; duration: control.Suru.animations.BriskDuration; easing: control.Suru.animations.EasingIn } } } ] } qqc2-suru-style-0.20230206/qqc2-suru/ScrollIndicator.qml000066400000000000000000000051311437021036500225610ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.ScrollIndicator { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) contentItem: Rectangle { id: indicator implicitWidth: control.Suru.units.dp(3) implicitHeight: control.Suru.units.dp(3) color: control.Suru.highlightColor visible: control.size < 1.0 opacity: 0.0 states: [ State { name: "active" when: control.active } ] transitions: [ Transition { to: "active" NumberAnimation { target: indicator; property: "opacity"; to: 1.0; duration: control.Suru.animations.BriskDuration; easing: control.Suru.animations.EasingIn } }, Transition { from: "active" SequentialAnimation { PauseAnimation { duration: 3000 } NumberAnimation { target: indicator; property: "opacity"; to: 0.0; duration: control.Suru.animations.BriskDuration; easing: control.Suru.animations.EasingIn } } } ] } } qqc2-suru-style-0.20230206/qqc2-suru/Slider.qml000066400000000000000000000100761437021036500207140ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.Slider { id: control implicitWidth: control.horizontal ? control.Suru.units.gu(32) : control.Suru.units.gu(5) implicitHeight: control.horizontal ? control.Suru.units.gu(5) : control.Suru.units.gu(32) padding: control.Suru.units.gu(1) opacity: control.enabled ? 1.0 : 0.5 property bool useSystemFocusVisuals: true handle: Rectangle { implicitHeight: control.Suru.units.gu(2) implicitWidth: control.Suru.units.gu(2) x: control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height)) border.width: control.Suru.units.dp(1) border.color: control.Suru.neutralColor radius: control.Suru.units.dp(4) color: control.pressed ? Qt.darker(control.Suru.secondaryBackgroundColor, 1.1) : control.hovered ? control.Suru.secondaryBackgroundColor : control.Suru.backgroundColor opacity: control.enabled ? 1.0 : 0.5 Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } layer.enabled: true layer.effect: ElevationEffect { elevation: !control.pressed ? 2 : 3 } } background: Item { implicitWidth: control.horizontal ? control.Suru.units.gu(5) : control.Suru.units.gu(2) implicitHeight: control.horizontal ? control.Suru.units.gu(2) : control.Suru.units.gu(5) x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2) y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0) width: control.horizontal ? control.availableWidth : implicitWidth height: control.horizontal ? implicitHeight : control.availableHeight scale: control.horizontal && control.mirrored ? -1 : 1 Rectangle { x: control.horizontal ? 0 : (parent.width - width) / 2 y: control.horizontal ? (parent.height - height) / 2 : 0 width: control.horizontal ? parent.width : 2 height: !control.horizontal ? parent.height : 2 color: control.Suru.neutralColor } Rectangle { x: control.horizontal ? 0 : (parent.width - width) / 2 y: control.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height width: control.horizontal ? control.position * parent.width : 2 height: !control.horizontal ? control.position * parent.height : 2 color: control.Suru.highlightColor } } } qqc2-suru-style-0.20230206/qqc2-suru/SpinBox.qml000066400000000000000000000144711437021036500210570ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.SpinBox { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + 16 + (up.indicator ? up.indicator.implicitWidth : 0) + (down.indicator ? down.indicator.implicitWidth : 0)) implicitHeight: Math.max(contentItem.implicitHeight + topPadding + bottomPadding, background ? background.implicitHeight : 0, up.indicator ? up.indicator.implicitHeight : 0, down.indicator ? down.indicator.implicitHeight : 0) baselineOffset: contentItem.y + contentItem.baselineOffset padding: control.Suru.units.gu(0.5) spacing: control.Suru.units.gu(1.5) leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0)) rightPadding: padding - 4 + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0)) validator: IntValidator { locale: control.locale.name bottom: Math.min(control.from, control.to) top: Math.max(control.from, control.to) } contentItem: TextInput { text: control.textFromValue(control.value, control.locale) color: control.Suru.foregroundColor font: control.font selectionColor: control.Suru.highlightColor selectedTextColor: "white" horizontalAlignment: Qt.AlignHCenter verticalAlignment: TextInput.AlignVCenter readOnly: !control.editable validator: control.validator inputMethodHints: control.inputMethodHints } up.indicator: Item { implicitWidth: control.Suru.units.gu(3) height: parent.height x: control.mirrored ? 0 : parent.width - width Rectangle { x: 2; y: 4 width: parent.width - 4 height: parent.height - 8 color: control.activeFocus ? control.Suru.activeFocusColor : control.up.pressed ? Qt.darker(control.Suru.backgroundColor, 1.2) : control.up.hovered ? Qt.darker(control.Suru.backgroundColor, 1.1) : control.Suru.backgroundColor visible: control.up.pressed || control.up.hovered opacity: control.activeFocus && !control.up.pressed ? 0.5 : 1.0 Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } ColorImage { anchors.centerIn: parent width: control.Suru.units.gu(2); height: width color: control.Suru.foregroundColor source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Suru/assets/" + (control.mirrored ? "left" : "right") + "arrow.png" sourceSize.width: width sourceSize.height: height } } down.indicator: Item { implicitWidth: control.Suru.units.gu(3) height: parent.height x: control.mirrored ? parent.width - width : 0 Rectangle { x: 2; y: 4 width: parent.width - 4 height: parent.height - 8 color: control.activeFocus ? control.Suru.activeFocusColor : control.down.pressed ? Qt.darker(control.Suru.backgroundColor, 1.2) : control.down.hovered ? Qt.darker(control.Suru.backgroundColor, 1.1) : control.Suru.backgroundColor visible: control.down.pressed || control.down.hovered opacity: control.activeFocus && !control.down.pressed ? 0.5 : 1.0 Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } ColorImage { anchors.centerIn: parent width: control.Suru.units.gu(2); height: width color: control.Suru.foregroundColor source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Suru/assets/" + (control.mirrored ? "right" : "left") + "arrow.png" sourceSize.width: width sourceSize.height: height } } background: Rectangle { implicitWidth: control.Suru.units.gu(20) implicitHeight: control.Suru.units.gu(4) radius: control.Suru.units.dp(2) border.width: control.Suru.units.dp(1) border.color: control.activeFocus ? control.Suru.highlightColor : control.Suru.neutralColor color: control.hovered && !control.up.hovered && !control.down.hovered ? Qt.darker(control.Suru.backgroundColor, 1.1) : control.Suru.backgroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } qqc2-suru-style-0.20230206/qqc2-suru/StackView.qml000066400000000000000000000046111437021036500213700ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.StackView { id: control popEnter: Transition { NumberAnimation { property: "opacity"; from: 0; to: 1; duration: control.Suru.animations.FastDuration; easing: control.Suru.animations.EasingOut } } popExit: Transition { NumberAnimation { property: "opacity"; from: 1; to: 0; duration: control.Suru.animations.FastDuration; easing: control.Suru.animations.EasingIn } } pushEnter: Transition { NumberAnimation { property: "opacity"; from: 0; to: 1; duration: control.Suru.animations.FastDuration; easing: control.Suru.animations.EasingOut } } pushExit: Transition { NumberAnimation { property: "opacity"; from: 1; to: 0; duration: control.Suru.animations.FastDuration; easing: control.Suru.animations.EasingIn } } replaceEnter: Transition { NumberAnimation { property: "opacity"; from: 0; to: 1; duration: control.Suru.animations.FastDuration; easing: control.Suru.animations.EasingOut } } replaceExit: Transition { NumberAnimation { property: "opacity"; from: 1; to: 0; duration: control.Suru.animations.FastDuration; easing: control.Suru.animations.EasingIn } } } qqc2-suru-style-0.20230206/qqc2-suru/SwipeDelegate.qml000066400000000000000000000066011437021036500222130ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.SwipeDelegate { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset topPadding: control.Suru.units.gu(2) - control.Suru.units.dp(1) bottomPadding: control.Suru.units.gu(2) + control.Suru.units.dp(1) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) spacing: control.Suru.units.spacingLarge opacity: control.enabled ? 1.0 : 0.5 swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing: control.Suru.animations.EasingInOut } } icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor contentItem: IconLabel { leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0 rightPadding: control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0 spacing: control.spacing mirrored: control.mirrored display: control.display alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft icon: control.icon text: control.text font: control.font color: control.Suru.foregroundColor } background: Rectangle { implicitHeight: control.Suru.units.gu(7) color: control.Suru.backgroundColor HighlightFocusRectangle { control: control width: parent.width height: parent.height } Rectangle { anchors.bottom: parent.bottom width: parent.width height: control.Suru.units.dp(1) color: control.Suru.neutralColor } } } qqc2-suru-style-0.20230206/qqc2-suru/Switch.qml000066400000000000000000000052771437021036500207420ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.Switch { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: control.Suru.units.gu(0.5) spacing: control.Suru.units.gu(1.5) opacity: control.enabled ? 1.0 : 0.5 property bool useSystemFocusVisuals: true indicator: SwitchIndicator { x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } contentItem: Text { leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 text: control.text font: control.font elide: Text.ElideRight visible: control.text horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter color: control.Suru.foregroundColor } } qqc2-suru-style-0.20230206/qqc2-suru/SwitchDelegate.qml000066400000000000000000000067151437021036500223730ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.SwitchDelegate { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, Math.max(contentItem.implicitHeight, indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset topPadding: control.Suru.units.gu(2) bottomPadding: control.Suru.units.gu(2) leftPadding: control.Suru.units.gu(2) rightPadding: control.Suru.units.gu(2) spacing: control.Suru.units.gu(1.5) opacity: control.enabled ? 1.0 : 0.5 indicator: SwitchIndicator { x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor contentItem: IconLabel { leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing spacing: control.spacing mirrored: control.mirrored display: control.display alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft icon: control.icon text: control.text font: control.font color: control.Suru.foregroundColor } background: Rectangle { implicitHeight: control.Suru.units.gu(7) color: control.Suru.backgroundColor HighlightFocusRectangle { control: control width: parent.width height: parent.height } Rectangle { anchors.bottom: parent.bottom width: parent.width height: control.Suru.units.dp(1) color: control.Suru.neutralColor } } } qqc2-suru-style-0.20230206/qqc2-suru/TabBar.qml000066400000000000000000000055341437021036500206300ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.TabBar { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) spacing: 1 contentHeight: control.Suru.units.gu(6) contentItem: ListView { model: control.contentModel currentIndex: control.currentIndex spacing: control.spacing orientation: ListView.Horizontal boundsBehavior: Flickable.StopAtBounds flickableDirection: Flickable.AutoFlickIfNeeded snapMode: ListView.SnapToItem highlightMoveDuration: control.Suru.animations.BriskDuration highlightResizeDuration: 0 highlightFollowsCurrentItem: true highlightRangeMode: ListView.ApplyRange preferredHighlightBegin: control.Suru.units.gu(6) preferredHighlightEnd: width - control.Suru.units.gu(6) highlight: Item { z: 2 Rectangle { height: control.Suru.units.dp(3) width: parent.width y: control.position === T.TabBar.Footer ? 0 : parent.height - height color: control.Suru.highlightColor } } } background: Rectangle { color: control.Suru.secondaryBackgroundColor Rectangle { height: 1 width: parent.width y: control.position === T.TabBar.Footer ? 0 : parent.height - height color: control.Suru.neutralColor } } } qqc2-suru-style-0.20230206/qqc2-suru/TabButton.qml000066400000000000000000000046411437021036500213750ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T T.TabButton { id: control property bool useSystemFocusVisuals: true implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: control.Suru.units.gu(2) icon.width: 24 icon.height: 24 icon.color: control.Suru.foregroundColor contentItem: IconLabel { spacing: control.spacing mirrored: control.mirrored display: control.display icon: control.icon text: control.text font: control.font opacity: control.checked || control.down || control.hovered ? 1.0 : 0.5 color: control.Suru.foregroundColor Behavior on opacity { NumberAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } qqc2-suru-style-0.20230206/qqc2-suru/TextArea.qml000066400000000000000000000072661437021036500212160ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Controls.Suru 2.2 import "impl" T.TextArea { id: control implicitWidth: Math.max(contentWidth + leftPadding + rightPadding, background ? background.implicitWidth : 0, placeholder.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(contentHeight + topPadding + bottomPadding, background ? background.implicitHeight : 0, placeholder.implicitHeight + topPadding + bottomPadding) leftPadding: control.Suru.units.gu(1.5) rightPadding: control.Suru.units.gu(1.5) topPadding: control.Suru.units.gu(1) bottomPadding: control.Suru.units.gu(1) opacity: control.enabled ? 1.0 : 0.5 color: control.Suru.foregroundColor selectionColor: control.Suru.highlightColor selectedTextColor: "white" verticalAlignment: TextInput.AlignVCenter cursorDelegate: CursorDelegate { } PlaceholderText { id: placeholder x: control.leftPadding y: control.topPadding width: control.width - (control.leftPadding + control.rightPadding) height: control.height - (control.topPadding + control.bottomPadding) text: control.placeholderText font: control.font color: Suru.foregroundColor opacity: control.activeFocus ? 0.8 : 0.6 visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) verticalAlignment: control.verticalAlignment elide: Text.ElideRight Suru.textLevel: Suru.SecondaryText } background: Rectangle { implicitWidth: control.Suru.units.gu(24) implicitHeight: control.Suru.units.gu(4) radius: control.Suru.units.dp(4) border.width: control.Suru.units.dp(1) border.color: control.activeFocus ? control.Suru.activeFocusColor : control.Suru.neutralColor color: control.hovered && !control.activeFocus ? control.Suru.secondaryBackgroundColor : control.down ? Qt.darker(control.Suru.secondaryBackgroundColor, 1.1) : control.Suru.backgroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } qqc2-suru-style-0.20230206/qqc2-suru/TextField.qml000066400000000000000000000073051437021036500213630ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Controls.Suru 2.2 import "impl" T.TextField { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0) || contentWidth + leftPadding + rightPadding implicitHeight: Math.max(contentHeight + topPadding + bottomPadding, background ? background.implicitHeight : 0, placeholder.implicitHeight + topPadding + bottomPadding) leftPadding: control.Suru.units.gu(1.5) rightPadding: control.Suru.units.gu(1.5) topPadding: control.Suru.units.gu(1) bottomPadding: control.Suru.units.gu(1) opacity: control.enabled ? 1.0 : 0.5 color: control.Suru.foregroundColor selectionColor: Suru.highlightColor selectedTextColor: "white" verticalAlignment: TextInput.AlignVCenter cursorDelegate: CursorDelegate { } PlaceholderText { id: placeholder x: control.leftPadding y: control.topPadding width: control.width - (control.leftPadding + control.rightPadding) height: control.height - (control.topPadding + control.bottomPadding) text: control.placeholderText font: control.font color: Suru.foregroundColor opacity: control.activeFocus ? 0.8 : 0.6 visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) verticalAlignment: control.verticalAlignment elide: Text.ElideRight Suru.textLevel: Suru.SecondaryText } background: Rectangle { implicitWidth: control.Suru.units.gu(24) implicitHeight: control.Suru.units.gu(4) radius: control.Suru.units.dp(4) border.width: control.Suru.units.dp(1) border.color: control.activeFocus ? control.Suru.activeFocusColor : control.Suru.neutralColor color: control.hovered && !control.activeFocus ? control.Suru.secondaryBackgroundColor : control.down ? Qt.darker(control.Suru.secondaryBackgroundColor, 1.1) : control.Suru.backgroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } qqc2-suru-style-0.20230206/qqc2-suru/ToolBar.qml000066400000000000000000000046651437021036500210430ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.ToolBar { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) spacing: control.Suru.units.gu(1) leftPadding: control.Suru.units.gu(1) rightPadding: control.Suru.units.gu(1) background: Rectangle { implicitHeight: control.Suru.units.gu(6) color: control.Suru.backgroundColor Rectangle { anchors { left: parent.left; right: parent.right } anchors.top: control.position == T.ToolBar.Header ? parent.bottom : undefined anchors.bottom: control.position == T.ToolBar.Footer ? parent.top : undefined height: control.Suru.units.dp(1) color: control.Suru.neutralColor visible: control.position == T.ToolBar.Header || control.position == T.ToolBar.Footer } } } qqc2-suru-style-0.20230206/qqc2-suru/ToolButton.qml000066400000000000000000000060041437021036500215770ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Templates 2.12 as T T.ToolButton { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: control.Suru.units.gu(0.5) property bool useSystemFocusVisuals: true opacity: control.enabled ? 1.0 : 0.5 icon.width: 24 icon.height: 24 icon.color: (control.checked || control.highlighted) ? control.Suru.highlightColor : control.Suru.foregroundColor contentItem: IconLabel { spacing: control.spacing mirrored: control.mirrored display: control.display icon: control.icon text: control.text font: control.font color: (control.checked || control.highlighted) ? control.Suru.highlightColor : control.Suru.foregroundColor Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } background: Rectangle { implicitWidth: control.Suru.units.gu(4) implicitHeight: control.Suru.units.gu(6) visible: control.down || control.hovered color: control.down ? Qt.darker(control.Suru.backgroundColor, 1.2) : Qt.darker(control.Suru.backgroundColor, 1.1) Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } qqc2-suru-style-0.20230206/qqc2-suru/ToolSeparator.qml000066400000000000000000000041321437021036500222640ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 T.ToolSeparator { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) leftPadding: vertical ? control.Suru.units.gu(2) : control.Suru.units.gu(1) rightPadding: vertical ? control.Suru.units.gu(2) : control.Suru.units.gu(1) topPadding: vertical ? control.Suru.units.gu(1) : control.Suru.units.gu(2) bottomPadding: vertical ? control.Suru.units.gu(1) : control.Suru.units.gu(2) contentItem: Rectangle { implicitWidth: vertical ? control.Suru.units.dp(1) : control.Suru.units.gu(4) implicitHeight: vertical ? control.Suru.units.gu(4) : control.Suru.units.dp(1) color: control.Suru.neutralColor } } qqc2-suru-style-0.20230206/qqc2-suru/ToolTip.qml000066400000000000000000000054631437021036500210700ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "impl" T.ToolTip { id: control x: parent ? (parent.width - implicitWidth) / 2 : 0 y: -implicitHeight - control.Suru.units.gu(2) implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) margins: control.Suru.units.gu(1) padding: control.Suru.units.gu(1) closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent contentItem: Text { text: control.text font: control.font // TODO: wrapMode: Label.Wrap color: control.Suru.backgroundColor } enter: Transition { NumberAnimation { property: "opacity" from: 0.0; to: 1.0 easing: control.Suru.animations.EasingInOut duration: control.Suru.animations.BriskDuration } } exit: Transition { NumberAnimation { property: "opacity" from: 1.0; to: 0.0 easing: control.Suru.animations.EasingInOut duration: control.Suru.animations.BriskDuration } } background: Rectangle { color: control.Suru.foregroundColor radius: control.Suru.units.dp(4) opacity: 0.85 // Match opacity of overlayColor layer.enabled: true layer.effect: ElevationEffect { elevation: 3 } } } qqc2-suru-style-0.20230206/qqc2-suru/Tumbler.qml000066400000000000000000000066651437021036500211150ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 T.Tumbler { id: control implicitWidth: control.Suru.units.gu(8) implicitHeight: control.Suru.units.gu(24) opacity: control.enabled ? 1.0 : 0.5 delegate: Text { text: modelData font: control.font color: control.Suru.foregroundColor opacity: (1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)) * (control.enabled ? 1 : 0.6) horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } contentItem: TumblerView { id: tumblerView model: control.model delegate: control.delegate path: Path { startX: tumblerView.width / 2 startY: -tumblerView.delegateHeight / 2 PathLine { x: tumblerView.width / 2 y: (control.visibleItemCount + 1) * tumblerView.delegateHeight - tumblerView.delegateHeight / 2 } } property real delegateHeight: control.availableHeight / control.visibleItemCount } Rectangle { anchors.centerIn: parent height: tumblerView.delegateHeight width: parent.width color: control.Suru.backgroundColor z: -1 Rectangle { anchors { left: parent.left; right: parent.right } color: control.activeFocus ? control.Suru.activeFocusColor : control.Suru.neutralColor height: control.Suru.units.dp(1) Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } Rectangle { anchors { left: parent.left; right: parent.right } anchors.bottom: parent.bottom color: control.activeFocus ? control.Suru.activeFocusColor : control.Suru.neutralColor height: control.Suru.units.dp(1) Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } } qqc2-suru-style-0.20230206/qqc2-suru/assets/000077500000000000000000000000001437021036500202555ustar00rootroot00000000000000qqc2-suru-style-0.20230206/qqc2-suru/assets/README000066400000000000000000000375331437021036500211500ustar00rootroot00000000000000Files included in this folder are taken from 'ubuntu-themes' package. Licensing details from 'ubuntu-themes' package are attached below. See http://bazaar.launchpad.net/~ubuntu-art-pkg/ubuntu-themes/trunk/view/head:/debian/copyright for further details. =========== Copyright: 2004-2012, Canonical Ltd. License: CC-BY-SA-3.0 Unless otherwise indicated, artwork is available under the Creative Commons Attribution Share-alike license v3.0 or any later version. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. See below for the full text of the license. . Some Rights Reserved: . The rights in the trademarks, logos, service marks of Canonical Ltd, as well as the look and feel of Ubuntu, are not licensed under the Creative Commons license and are subject to the Canonical Trademark Policy at http://www.ubuntu.com/ubuntu/TrademarkPolicy . License: . CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. . License . THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. . BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. . 1. Definitions . 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. 4. "Original Author" means the individual or entity who created the Work. 5. "Work" means the copyrightable work of authorship offered under the terms of this License. 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. 7. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. . 2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. . 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: . 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; 2. to create and reproduce Derivative Works; 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. 5. . For the avoidance of doubt, where the work is a musical composition: 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). . The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. . 4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: . 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested. 2. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. 3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. . 5. Representations, Warranties and Disclaimer . UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. . 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. . 7. Termination . 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. . 8. Miscellaneous . 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. . Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. . Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. . Creative Commons may be contacted at http://creativecommons.org/ qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark-undefined.png000066400000000000000000000002131437021036500246460ustar00rootroot00000000000000PNG  IHDR szz pHYs B(x=IDATXG̱ DuA2 6?G$Yˢ!)[=سW 6<#IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark-undefined@2.png000066400000000000000000000003021437021036500250270ustar00rootroot00000000000000PNG  IHDR@@iq pHYs B(xtIDATx^ҫPEћ)29*᳞1DO>$ V<[k~=eG&XڐUu̎nW; {gצIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark-undefined@3.png000066400000000000000000000003521437021036500250350ustar00rootroot00000000000000PNG  IHDR``w8 pHYs B(xIDATx^ձ 0E4HP01K<,dHΩoav|PyﭵW[̒1Mӳ ?9VAvNҫnzKUz Yo-` [ $Vzח~ fq(IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark-undefined@4.png000066400000000000000000000003671437021036500250440ustar00rootroot00000000000000PNG  IHDR>a pHYs B(xIDATx^1QDY @N0 `B>Ix/8 611ɹ 1ƽd:9O]dv]o3?gn0|$u{ O{|bf%IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark.png000066400000000000000000000010001437021036500227020ustar00rootroot00000000000000PNG  IHDR szz pHYs B(xIDATXG?ka5i T@rH2` !o`R_o؋bVAh8%\ bkVBR{43aYGZ`L8h[.xD?P `8~ f  lN}J9`=nq8%`5l*0ݯ9Ӏ>@3yϊp]SFⅨz7yXDQ_ $IWE9I̩^N}vQoZV R+p-6+z>m@NHp~J=`-V}HE L?k7B P2.8IoKYFVs˨ĦމKMw#QuނUrRJ|Y̘zX9!宣IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark@2.png000066400000000000000000000021501437021036500230730ustar00rootroot00000000000000PNG  IHDR@@iq pHYs B(xIDATx^MTej`}QTnE}@*JE}U-!ą ++ D[X-;-=ΜsfƙQow<{btQLMM}N|Pǀ-j<6604xi:.M#u>:01gQ`eƼx\M #uX1RڑJUקdk㭆avU@^_`GS@ >ΘqgWrDV.0o<]4p3[vJ@3ۋd'`vv[2h=n$wuDZ=F{7,+cˁDž!%CC]$9SwCr:&x>8R J`/VB_,H7 x!KQ7s("qoWk2TBؠ~Ծ{'nuM/W-X/5mzOȯ!;(Oq /9Lq}'(KRiE? Hi&W &ԟs4 =a`T)ͭ9H}9B>ߣNa`c{X)d\S 9NA뛶 FcgV @-=<\N5$LWH~7hHΝ*NwKdozQ !짘ߜSȢ ̽{ہw^?R| BXV}W@z pgmrRԙ8WȞ$y1bg_gU@JEC/$O`S'Ximy'm$[g0XGrujߣt | dQ/#9-MweJ/T0 HQy%dX+P+ q` gN[/tp* 9֩;;G(VQQQQQQQQQQQQ'F:GUbIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark@3.png000066400000000000000000000033441437021036500231020ustar00rootroot00000000000000PNG  IHDR``w8 pHYs B(xIDATx^e+pgԐTE  gܡML JBbhmQdH4`c-Ęp1Wgvwg1c1c1c13I$ l_XXxA^4{$ܝ[} OUOEѶ4M {Kz &i󠵠I:]'鞮1\3Iw _-^ւ$8NƂȆ⃝CFGzڳ $_Z> voZ`N-Û Ǝb>IzpW?_liӦϥ!IK,Y \+HI(vT$v~`PaGt:/+e-$')XS=HVA \R|q_6=LOO8r%ZnAxkg%UZv5͛N Db 4̇1_HzM x&R^s'Q|p$<_\tF뚨c3_b(rXs%݂8^OgIzXcIJ+ϕd88(#;9Uwa  OJ"7I"8/ M4M(.DFQ?MtI$o;S~WJߟ*o`KrJscq` -I~\'w++q&~*X7g@$fYvPBQ4 83u\=\ _ UZ7$}5-˅C!`%;I*+Zߥjſk15^#},"pÐtp7k/%UlU]gU+iu(8$I~H?(q,jIV{Q]砾R-I3Y;X!t0pjy$ޢ*kO}'CٶFoUiz0 [(VDQ`xo\ʶ=)iR߬C-*ѯ{v/.Ds{tI $Q͟Tq;I,?NPx1|䯌-B7nEQtQUՖT [74I==[TQjP`: ntW(c=:?*R*>4d* a>KRh; ? eJZ(D'(0X҈I*/,ݥ\|hH7 WIVd|Ir&{Wdig@7Ig>+I)yɒI>^ᜫn433\Kc1c1c1c1` IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/checkmark@4.png000066400000000000000000000043401437021036500231000ustar00rootroot00000000000000PNG  IHDR>a pHYs B(xIDATx^keHBHXb)ahE" /Auw~s$*FDL AR) AC6̞$'ygf9s9s9s9s9s9s9sy eVWW<*wj+p"-/J[;䄝p#Y ^^Ei^g|7o.mw>%+ _|IGZknn>`I]0<\.ݛ~PP6j>5|SbŊt`$]\nuRi]Ry凤/࿶Rou+@aHxAp\R(I7'X]q|յ cqA bqƊ Sry VZ-pYQ;~CI.zOJu g$96˲r(VԍOtfeY]ӗC I\ ꚮ+..K:ۊz`$x5Bۭ>&HmVt$bP|L@{A x6)(+ \d333v4y:+X$= cV̬ڦz}~C )6h4MiȒ ,˶<{q͊1@ҕI-/}Z;KsZ]0\qZF6$ۼuߵy}Ijk1oFr =lGe&I2Y..5@`̊Ga $ YluM^#I+,:IoVRiMRau4,˾f5-M %O9=0@҃AVn"V+jڽ4AplǿqzȲq/Y(*Z| È&@$/YߗъNR!`mnq4WWf%q$J >ϭn-+W| X6҅>"pW %}D߳0$YeVz~L 'Mǰ$VPq|-LI끻GI]V&I4 hkY0I[btpյ I6 dk'8n^r9 p+pնqshFz؎wZ];YQ#7jW0_>Zۣ( ^Ei ǡib"+EiE.[ &$I#6P;[$ъ&m&@[(zxնq|E4Ӏ:ئ1EiE MV(NMV8 IPSRa>wYI_.vJIZ]p8~qt5pu Z߭Wj_$=ky2 Z;0ApXۭ"Vx`xr|_4H4̲> q2I|wkhH3`;$]eEan'q8+&̓t puI0|">h'i'4η$}[$qY uBq<`޲eoa$IG0ZV=J{ %..#=9y2r9[ˆ9>xH>j|[ư4 >tشiSsϽah p#p.RV 0Zj>VTDЪ\. PKu+$I^ebyr(f4/z'򰮒t]&{!]'i e7 pnMUӦp Mӻ(z 8jEҠ R!'y`TnMa'pOD5씴ΊQX$]VxKRWyi^EZ߭OaxP/X*i`7j|qV4'[FZI:V/_GLZIxC3`:LtmmfT ~O/T*UTr񼁼c6_~TV뙁s9s9s9s9s9s9s9w0IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/down.png000066400000000000000000000007071437021036500217360ustar00rootroot00000000000000PNG  IHDR szz pHYs B(xyIDATXGӿJQg&BXh"W0(Abg3- rREH4IeSL\6H9=/ AI`\Xƀ#Yq|lqgYVm10~+4$u=.i~\Q73PG? ;[>Z,ۋ:wCSw@AMj~}/-NoU]GC`AR- ,PPmڿ^5pD}U_HRT\|90V+IgC(iXͯ6z7 ~~MQm5IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/down@2.png000066400000000000000000000016741437021036500221240ustar00rootroot00000000000000PNG  IHDR@@iq pHYs B(xnIDATx^OEoUf9 A0ɘD(D/ "hͬxxP$.Q s0J^D1(j0t0c1c1spJ|TZj6y9;M Is"k{HB8?6{s8::z}S 8dY6jv>vKwF|qx<:8!kw& (tx۝eTm$pM)pD3zS`%ixڀ>t6Q$mqνcQIMJړ,jvӕ'JV7P%]IWmtcBR>/Kzr$nL Dn^Kn@;Jz:p^h4쭞]٬y{*p{%} tz,˼~ ΁$Uw$I/iJ{AतE55eEP&`-EL%Հg?R<=-ي7@uι1ƞGO{~{^y$ιC1ÒWs՗tHxwu'rϒ_6}{-0 79u1ܩ,oreJQGfɯUmQι+1[os1I?U"ռc1c1s ܻ%9/IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/down@3.png000066400000000000000000000031131437021036500221130ustar00rootroot00000000000000PNG  IHDR``w8 pHYs B(xIDATx^g33%)i1V1ZJ(EOECB `m & bTdv;bJRQSb+Ib !"A+KJkv{+>3w羟=v3`1c1c1c1c1c1c.B_(IsKڜrGU" M Fi>Eѷjc.q}z0ιU=$qι/S"z "%p; <W`oEj'=Y3gǎnt:Dǀ߇aV3zmY= ?T8sa04VZޕ+WV*9FٳǍ^_.=.ق4?&)kQ  ""k/MyXڂ5`ddn7!ຜg":x;}t 'q}FU-"ܜZL&"ED_<#"g *fU}I"łܼXi>U( 8؟d˦ݡ YRSOaXmKˬ5wv:}p+"c1c1c1c1c1c1̇wZ*YEIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/down@4.png000066400000000000000000000035451437021036500221250ustar00rootroot00000000000000PNG  IHDR>a pHYs B(xIDATx^hw.i;1[8SU':mnn3"ڤIˏ-uek&Cn!Ye0D:Ϻ,?-&y]zyy${& """""""""""""""""""""""""""""""""""""""""""" &ٻCb|>x̿ƾu1Ɵٓ!{nΛmBX,s:GfpBR,@e1ǀwL* l6a9df-@-}xXmfe//:|n&p"ϯ|tta~jf/T8Ą$I6w-43!Nf],w1=D8.>2UW=`B>3{p7kgC7Ň' c}}}o}k'sBp ~Rr|?pkSE@'@ʕ+{W^=Rm`F`+68aN$7oZפ'O{L/'^yAbc`%O&Ir*$}Ç:U%<Ҳo^(^&ef~]^ l1{\$M13~煓ڵ3g ⡖g\߿bddd?pVSd%^KxT1hq;ދjX<ⅵ0HoH|k+~oy #3{;}:' k5`f9`Km'ھ;fTYW@r =cdJ!Zk&'4͠T*]S.Qvr ^8s6Nz1XX[[[7wuu=.-9LTzO\>\/l1*ĵ7pjx NyL6'4aT*]U.ڊ56+ڊܷdɒέ[ˋۨ}?kjf[v+>`xBرcgϞc.]Y\awoܸ5/h=}m+Cz[; :$In1S@#=L,`fkH4d*gy8s\\?fAZq`C]4=z4ԩvҥZO! ;^\xn/c$S2fpX'f/J |{}O 3q~JҪrH۩!w[0\Rv豪?] ttK jwX#@ĄZ8Ll^;GB1j_\nKP8配i $ɵ1w=>NT^Ț~*B$7Wx = ^e׭ɗKNχvِ7E53 pW g˖-7E9M@;=|YUֻN{qZdxx--mfmzdo~кeeoҥ{:;;_95ʓ;w7d5F2Gl-:_(R[vcWIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/leftarrow.png000066400000000000000000000010461437021036500227710ustar00rootroot00000000000000PNG  IHDR szzbKGD pHYs B(xIDATXG1kAEOBm D,RVXZEyݘhV V?AmLc'A΃1לewsMs<> ?#7gk`x9 Io"?gi* be^yZgےFY! HZ+%o8 x zHq ;#?%} t"P4Zt~zg:X:xzg:H@U1vi08<Ͽ&(򒪪N]1yfX$뀲,ai~cB,kFfGz[DH2'Y:}#zߞ7l3$(n6:ak>shRvm"3&FHUw.ƘyQGPˀ鄵hcFi"2> "[}(V;(t*Mgk]&,U}ϐI@gN}Q7M<3Hk^$yyepU4"<Ϗ(&Wv7Gk:T4 f50 u꣪첹u,#n.yx[V,mty4( @DdY6I[:ΏuAh?.,;IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/leftarrow@3.png000066400000000000000000000036071437021036500231610ustar00rootroot00000000000000PNG  IHDR``w8bKGD pHYs B(x'IDATx^m\Wlv&h-XTښ֔PVme=s]+%jRUL&X4RRJM>*ڤ.۝{0{C{ΙؽϜ;sU9vRS?FZ+R[N 9jj'Tv?Ԙ҉QW IVc?W~/S:jc\eUAXk WWQev^``|yKx/X8&48 ٯ۷ϋ.|/&nw[{R5<'4z'T{t!= ; 1<&4nAY-y0S1Ƽ]jS5U1^@j~7𺢮hŇHJ`QWJݖ$qwʼsu9 @ԃ ^S@@ !fggn=qc!A 0Y#B7`xSQZiZB Xk\/Xk&LYmn Fܧ Kkc̯= =e!RByPx@ ^ngs_^RH'4 j_cbZ@r[Rx (*nNB}xy J"z9wwmp^rAcB`.z t(n9#A՗vI:DM&kUsA/n<1*/jZ= &֝VM(c̍ ׆9i5(`'m[ ~8,X`q;qyn[<5 `#{uu{cA)߿WG#abKGD pHYs B(x IDATx^{\U?2]Y#/!&bG# 0`1Fib-gNw RL 1(jAH?jlu3R8B2g;9y(k-xzsZN?2ثMܠz-TnF#Z^~% pLOO W_I, 8WI,1^~' j`WS1Ƽ4,c p7^]_H,k*D`4͋MzN=1d@9* 4wTRj^G$zF>!kEQmm[I8..<|\kv^&8pVWZh4~}!/AȷVh4roHF:Z{PyrH_ NpTeY<:rH#R ycGEQim Xkr/Q~Y~ ppp;roI#W}Z:SoD7t:?|ُAfS\)U7055u:{ʕ; (@ގ{PZH JceBe7pGGhoAZ)h"NO yx+1MBfY lF<ϟ PNv*BszN۷l:YMIyx'ܕ<<֊GdY6)\(TB8 oرc k헤RjZ/ q9@Z;*7rEԽ~4^ 022rAe):8 }=.+ycx'-[Q.eYm_;jW WC=Rz,<;)r'Rk EQ! <@k'zʲ 0444 ]\Tۅ{k:.GQ 0>>"c>)Aҡm۶B=Q .?t? őAhf !F^BvSz+$dYh;*t:;BS\<߭_)YȽ$ ч(JZ:o#{xG(WЧ0*+!480|XʕRk4r_H#+_rkr_H89e٥ v߮.$@?WJ59̿D$@S#Be1BפI"0Ɯ <<#[/$^૮ׅI^$Zw?B`h@`4GR҂RoH,6໽zN`Xk+{{u$0::p!E}MZ?3I.k}zH- r ~vC†1IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/rightarrow.png000066400000000000000000000010601437021036500231500ustar00rootroot00000000000000PNG  IHDR szzbKGD pHYs B(xIDATXGAFOM"(-l m*,+ &o5| M@ELD5)fv(nr&HU%]x"iϓr 0N$mzb_WۗUUW$U߇cSHzl.WUSdu>@'z `f߀CO1h-(-3ԁ7D[3uvESo&H:`y8z#t |1bhNB=#;,[o7bl6ۍ1ޛٶ!1o%+0'}{:?>uSIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/rightarrow@2.png000066400000000000000000000023321437021036500233350ustar00rootroot00000000000000PNG  IHDR@@iqbKGD pHYs B(xzIDATx^͛[h\EsM"x T"[ִPI|鋊7dϷ߉EM_^M"UBPvw=v.9|pfb@Uǀ1I`#p[?SlB𾪮gINT~XR~X `ӿaU}9H(HfYv`4jM4a"X333St~G!h"u[TflLJT8'&&ΞǐRS?Eonnno/ݎtmweQ#Pege^sP@Jk~VWDJ,o:ҦhB@ \H"rEP`;:"Z/EDHcڷ}PD @DNcqUuw@`ΑTK|a=xّ.4<hJ,;hёC"zt:@ۑvvRj#]i 2vyC2nPլǐT]ԁJ}@T1oNE\"f]c " [EmTz!Iev.x1Ki^cȪ\(YkrW{Kw`S{`GD~RsnM{ t@ed `~~Vȗ`|!077wNi3"z`ґ^I4+3%X@(68Hi΄<`s@$I4L1 Ƙ[%8REWMWIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/rightarrow@3.png000066400000000000000000000035531437021036500233440ustar00rootroot00000000000000PNG  IHDR``w8bKGD pHYs B(x IDATx^ݝmWgͦƸ`؂рhhEh%]j,AKF673g61n5`P_jhh ֗|/Rl(B݄fݝㇻ '^mus9oϙsϜq!8y~mS#`%p]ϳX[@_԰"`Ⱥ~R’8"rMƩ`I&˲lkln( l.vLX.ҜrcUUH3ιctOyy]w۷/  Jٛ< [KLMM:wܟkv}]yJ5fF/G5y}NKԘ#"Ј,JJs#`.76pĉ??{WJ/=u7^<:̞j]]׿kwν(ZX>)JU!Bɣ¼ =J3UUE}4 !hu]711F_|tsnwqJ7D#{ R%7OT.4뇵։N~.2;z&:㷊,Q 8(]쨪jMR ܠ&V6ͼo+MvB^+" ~ <[˲lcE1| xQZB\Ynf^$pJ)mvνI͐,>u]SD.JF@vM*Wr$#`vvv?pF)*"/S򁓔={< wMSA3+Yno/R򁒜<ܫP*@1*""g6s늢xL2خ!iHYw'|KBzVjHV"GsJ~s]+zpΉ4I XNb3 !""+JsWz#yik;"2̕v|H^݃:U=aEIz jV-HZ݃%?e_|IV+l"p͇Bu+@HY:ED@-pQQ ,pjYNROkٞ&)k h^L25rR_QN2&''RJgFGGw) 0??u-ϲm۶-h5 $!,ἇB?Wr3D/,ˡ§ιEQ\Y!z[*(~䦈^@;JJn!,>47IDPe'$Q jx~4t-%Ju]{^{X,-O!`\(=41c:˲in/LOO'LA"r5+5BV'Y|,ۚy"ʲPJyC%ZB8wΕJ'7z97`ܮE݄DdxP)uƍV(1+灱M6[l1)@DvoH1`Pl޵=[~J1%`jjjp{$3nǶlْԳG}Y=04Ο?SJGFFU$01_az?dYkΝfV=WL@ _vν?;Lpm.ŎU_bVuݻcIBݾ4_̐,֦w:s?2seIabxIVC?9w9gIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/rightarrow@4.png000066400000000000000000000045211437021036500233410ustar00rootroot00000000000000PNG  IHDR>abKGD pHYs B(xIDATx^kU:Z%$/[hTb Z 3 c!xIP5 V1jQjKm;2=wWksy~_v3g\DdE^3^ skQ/Q|sYQ)!c.(*&,Nc?Fwg&F㚢R? EZ닊S ECƘrQ1! p%x /F!OtRi'p+kor.Z>,\#v]v‘'r@k=Bccc<T*U^Wnm4+\ysOꨔ:η6m*G=^ "T|/ yx/!^h,h BIWh1bW+>,Z, }5<`Z?h򞱱BA +֮o6pZppQ)w:۷oȣ"8RJ-*o_#ѠBb|,_՞rQgYZ?Pbll!?1QzG<Z?ȃ&p+8O)yD!/J)i1_ȃ% \)JsF^Hz wGv5G,RjP`ѸYȃ#*sё ]yhD'… ,ýVZ )Tc`R5 dG+Y.T揍l Zrw'Q dY 8*CF-@V{!T4ͫk\. qY0 >l*:!L̜9s8C&rV\"*[ֈ{IJr[)c|!$@'R5!T,,‘t5Z 74#EGn | ~z SJ(ސpeJ܏nغu9jگ%֒$@eyXqWrHG*;v4q *B$ Z+T=qℴIL< 닢$$-TfZ-/'&O 3s$&y$I1$c+N=B|cI)jtttFAgHDN`Xk l8ZSNjr.=G8!)TJu4=I&I~^tA mBޓ$&`pAHL|/ʋrYðgIL H'ޛ/$@Ƙ*ӦM[{$@15ѵk׎ yOh6o>"T>}It:;RJ_f 1ngϖn+$˗/?.^8Ƙk }wRt~BIЍBew(g@Ds:YrHtq[ʎZK!$@Ζ-[fZk7~%" 311x+WJU}}#FFF.J&1\x@k}# hF|v#RJ4c7wVyD`y:ml ӈeL|k1\)^?C' ?wPymghZ_\8ϲ1<VFq`PY_5A1o^T*<E~ʲlq G +/%@~*?3gǹ?Fct`'PvT7>?&\WZZX bh4 Mz]4Z1#3f yx=۹ QigYիW͑GorJzV{̕'<h\Hwo'T7Zkw^{T*|K"Nu&RjIZ#OtOwG<хT*l8$Riaz75BZ8 vJ;' iuEArpX088xp\^EQ/!GOD94mbIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/spinner.svg000066400000000000000000000012741437021036500224600ustar00rootroot00000000000000 qqc2-suru-style-0.20230206/qqc2-suru/assets/up.png000066400000000000000000000006731437021036500214150ustar00rootroot00000000000000PNG  IHDR szz pHYs B(xmIDATXGӿJQgf;%$"iBHܝgH*)#اHҬ Tu-f jfvugxw^> u^@ux qr*j8S`tttY](nq?~$`hFqtWg`6Դ"$/~ ~YF OG`[!}qnVb$x h!IvY:|~eCK+w7:7̫8 L~AQ Mӹn ^5{J^[>v?'{!RgjM< x|m]nIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/up@2.png000066400000000000000000000016721437021036500215770ustar00rootroot00000000000000PNG  IHDR@@iq pHYs B(xlIDATx^Mh\U{$EEAAA%PuH+mvaMMEL&nvՅD-~`FkThP "L%sL&hٜ<ys9 8s9s9[4nZv:Mf !l/Ϙ`ᴤ_wں@RxŖuIO;neYwy`f!WεۿI !isO3=MZ'@ҵfV!<_Cޭ3;Bx^l:>I pU$~ xF߅^ <<*Hb@eI$Bo9` 8(v3Iہ瀭@w!1MQ.`S!~NtR71>> <-ij `@lSyV glgegb$ZhEz?EIYjWم&$"/P/j `ll6̬?˲I6 I; Q; +x3@OnniN.B/Mdzdd,<41s9s9sITIENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/up@3.png000066400000000000000000000030111437021036500215650ustar00rootroot00000000000000PNG  IHDR``w8 pHYs B(xIDATx^g3;{xbU V" U"-Q!ԤEz(R+0M+jk)j4ZTFAVHijnf33no/˲ǵ1c1c1c1c1c1c:VNeY8nȲMFk,qMz'N[jMe7ICh Ÿ#I2Cc  SN$7M4LNNFO74Csw{o$Iʦ ]|2paC|N?ndSxI7N8vx7nܽs^SxV,FZ֕^ q< Loڑ\Duo(>,˲+jU MTM]T?$]LUeNs97˲_7Wʪ ;T{}sFAI7d4~piCeI7V@ v#EQ{*xOR7 iF`(It` 74DEi>Ӑ]N,'&6*цܲHn#<..IrK&"`'-|=Y+V];˲9@%QzIOr&˲ ι;kѣ8HdE) ˲ι}}IG Sا1DZ$y![e/@G{7bǀQͥi:ȭ<7h"MÁY[<>gY6ܪt 9"tJW hR$@lR-LkS@I ?YUo-5(Eё$INd:mi&6%_\ˀj"p&iU,63` `Hzf=hIHPjה<ϷzgT3@GY]Ϊ={\Rm5kQnt 8N@UU@mEqSW%=P~Nt5ÝD ܎v}pjj \8eY 5;(&˲ksss~ O$>[奛6mzlnnD)U^)sŴ}.j| 8.5 <,l9#}"xJұ>n~~~a> ܧ8tWx =ԟhKClyInIn2Iz?|UN<wEif&r?ծq6Ȳ9> ZغVUpx;|k8$9U> dTW9w8oOOOg9CVu~+Ws^sI,;UyJ}pD5c1c1c1c1c1c1_ IENDB`qqc2-suru-style-0.20230206/qqc2-suru/assets/up@4.png000066400000000000000000000035031437021036500215740ustar00rootroot00000000000000PNG  IHDR>a pHYs B(xIDATx^k\uB J"%qVQo-HRX{suj)mD %AJ}A M0@[kYs|qf>/g'yDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDf-4^n6 ^`6ڸq'N%˲<ޅ ޽f͚޵͜* ݔe3"u[zzz^YiN|xk޼yk׮=dެ.3{Xo`'լ,3;Xra`;P2#^̪رcǼÇ. z)pge[l R!Ik,66/eǰ/0Pvӯ(Z`+jذaͣz3mf!`Q_ ?~Ooo?p+i0 8߉1`=1^:s$`bqk3\./M{+2gQ8~ 2w}Lw^p5Ȼx oqO\4Mӕu@Ȁ+/رc?/:::=jW^j7pT+4}G{;\V QߖQ]^p,*3BgYv'-!y_4]@SXekD @Rxddd7a/KйY\$ɗA=_,5TI\e~Cbm ɫٛf/xZ]`fdzV_3!IF$)w'p{=DfRT.ybf4z@AR/ <ѱo=$i> Um켦Gۻ)wO/‰_uBc!IUY>BzTzI៚>E>}Gk#_ vhhh5$* _C .>e^}U%򡡡7?\?s;JZk_`QhaITidf!=OOauT0w:[(V23*ŧNȲf)_$SIENDB`qqc2-suru-style-0.20230206/qqc2-suru/impl/000077500000000000000000000000001437021036500177145ustar00rootroot00000000000000qqc2-suru-style-0.20230206/qqc2-suru/impl/CheckIndicator.qml000066400000000000000000000065521437021036500233110ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.impl 2.12 import QtQuick.Controls.Suru 2.2 Item { implicitWidth: control.Suru.units.gu(2.5) implicitHeight: control.Suru.units.gu(2.5) property Item control Rectangle { anchors.fill: parent color: control.Suru.backgroundColor border.color: control.down ? control.checked ? "transparent" : control.Suru.highlightColor : control.checked ? control.Suru.highlightColor : control.Suru.neutralColor border.width: 1 radius: 4 scale: control.down ? 0.91 : 1.0 Rectangle { anchors.fill: parent radius: parent.radius scale: control.checked ? 1.0 : 0.0 color: control.Suru.highlightColor Behavior on scale { NumberAnimation { duration: control.Suru.animations.SnapDuration easing: control.down ? control.Suru.animations.EasingIn : control.Suru.animations.EasingOut } } } Behavior on scale { NumberAnimation { duration: control.Suru.animations.SnapDuration easing: control.down ? control.Suru.animations.EasingIn : control.Suru.animations.EasingOut } } Behavior on border.color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.down || control.checked ? control.Suru.animations.EasingIn : control.Suru.animations.EasingOut } } } ColorImage { anchors { fill: parent; margins: control.Suru.units.dp(2) } color: control.Suru.backgroundColor source: control.checkState === Qt.PartiallyChecked ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/Suru/assets/checkmark-undefined.png" : "qrc:/qt-project.org/imports/QtQuick/Controls.2/Suru/assets/checkmark.png" sourceSize.width: width sourceSize.height: height visible: control.checkState !== Qt.Unchecked } } qqc2-suru-style-0.20230206/qqc2-suru/impl/CursorDelegate.qml000066400000000000000000000037011437021036500233400ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 Rectangle { id: cursor color: parent.Suru.highlightColor width: parent.Suru.units.dp(2) visible: parent.activeFocus && !parent.readOnly && parent.selectionStart === parent.selectionEnd Connections { target: cursor.parent onCursorPositionChanged: { // keep a moving cursor visible cursor.opacity = 1 timer.restart() } } Timer { id: timer running: cursor.parent.activeFocus && !cursor.parent.readOnly repeat: true interval: Qt.styleHints.cursorFlashTime / 2 onTriggered: cursor.opacity = !cursor.opacity ? 1 : 0 // force the cursor visible when gaining focus onRunningChanged: cursor.opacity = 1 } } qqc2-suru-style-0.20230206/qqc2-suru/impl/ElevationEffect.qml000066400000000000000000000033501437021036500234730ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2018 Stefano Verzegnassi ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtGraphicalEffects 1.0 DropShadow { property int elevation: 0 //cached: true // transparentBorder: true verticalOffset: 2 enabled: elevation > 0 radius: (samples - 1) * 0.5 samples: { switch(elevation) { case 1: return 0 case 2: return 5 case 3: default: return 25 } } color: { switch(elevation) { case 1: return "#56888888" case 2: return "#70888888" case 3: default: return "#62888888" } } } qqc2-suru-style-0.20230206/qqc2-suru/impl/HighlightFocusRectangle.qml000066400000000000000000000045121437021036500251650ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls.Suru 2.2 Item { property Item control Rectangle { id: highlightRect width: parent.width height: parent.height visible: control.down || control.hovered || control.highlighted opacity: control.highlighted ? 0.5 : 1.0 color: { if (control.highlighted) return control.Suru.highlightColor return control.down ? Qt.darker(control.Suru.secondaryBackgroundColor, 1.1) : control.Suru.secondaryBackgroundColor } Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } Behavior on opacity { NumberAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } Rectangle { width: parent.width height: parent.height visible: control.visualFocus color: "transparent" border { width: control.Suru.units.dp(2) color: control.Suru.activeFocusColor } } } qqc2-suru-style-0.20230206/qqc2-suru/impl/RadioIndicator.qml000066400000000000000000000061001437021036500233170ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Suru 2.2 Rectangle { implicitWidth: control.Suru.units.gu(2.5) implicitHeight: control.Suru.units.gu(2.5) property Item control radius: width / 2 color: control.Suru.backgroundColor border.color: control.down ? control.checked ? "transparent" : control.Suru.highlightColor : control.checked ? control.Suru.highlightColor : control.Suru.neutralColor border.width: control.Suru.units.dp(1) scale: control.down ? 0.91 : 1.0 Rectangle { anchors.fill: parent radius: parent.radius scale: control.checked ? 1.0 : 0.0 color: control.Suru.highlightColor Behavior on scale { NumberAnimation { duration: control.Suru.animations.SnapDuration easing: control.Suru.animations.EasingIn } } Rectangle { anchors.centerIn: parent width: control.Suru.units.gu(1) height: width radius: width * 0.5 color: control.Suru.secondaryBackgroundColor visible: control.checked opacity: visible ? 1.0 : 0.0 Behavior on opacity { NumberAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } } Behavior on scale { NumberAnimation { duration: control.Suru.animations.SnapDuration easing: control.Suru.animations.EasingIn } } Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } Behavior on border.color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } qqc2-suru-style-0.20230206/qqc2-suru/impl/SwitchIndicator.qml000066400000000000000000000072061437021036500235320ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Templates 2.12 as T import QtQuick.Controls.Suru 2.2 import "." Item { property Item control implicitWidth: control.Suru.units.gu(5) implicitHeight: control.Suru.units.gu(2.5) Rectangle { width: parent.width height: parent.height radius: control.Suru.units.dp(4) color: control.checked ? control.Suru.highlightColor : control.Suru.neutralColor border.width: control.Suru.units.dp(1) border.color: control.checked ? Qt.darker(control.Suru.highlightColor, 1.1) : Qt.darker(control.Suru.neutralColor, 1.1) Behavior on color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } Behavior on border.color { ColorAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingIn } } } Row { width: parent.width height: parent.height Label { width: parent.width * 0.5 height: parent.height text: "I" color: control.Suru.backgroundColor horizontalAlignment: Label.AlignHCenter verticalAlignment: Label.AlignVCenter } Label { width: parent.width * 0.5 height: parent.height text: "O" color: Qt.darker(control.Suru.neutralColor, 1.5) horizontalAlignment: Label.AlignHCenter verticalAlignment: Label.AlignVCenter } } Rectangle { width: control.Suru.units.gu(2.5) height: control.Suru.units.gu(2.5) radius: control.Suru.units.dp(4) color: control.Suru.backgroundColor border.width: control.Suru.units.dp(1) border.color: control.Suru.secondaryBackgroundColor layer.enabled: true layer.effect: ElevationEffect { elevation: control.enabled ? 2 : 1 } x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2))) y: (parent.height - height) / 2 Behavior on x { enabled: !control.pressed NumberAnimation { duration: control.Suru.animations.FastDuration easing: control.Suru.animations.EasingInOut } } } } qqc2-suru-style-0.20230206/qqc2-suru/qmldir000066400000000000000000000002131437021036500201620ustar00rootroot00000000000000module QtQuick.Controls.Suru plugin qtquickcontrols2surustyleplugin classname QtQuickControls2SuruStylePlugin depends QtQuick.Controls 2.2 qqc2-suru-style-0.20230206/qqc2-suru/qquicksuruanimations.cpp000066400000000000000000000041761437021036500237660ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2018 Stefano Verzegnassi ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ #include "qquicksuruanimations.h" QQuickSuruAnimations::QQuickSuruAnimations(QObject *parent) : QObject(parent) { m_easingIn = QEasingCurve(QEasingCurve::BezierSpline); m_easingIn.addCubicBezierSegment(QPointF(.55, .055), QPointF(.675, .19), QPointF(1, 1)); m_easingOut = QEasingCurve(QEasingCurve::BezierSpline); m_easingOut.addCubicBezierSegment(QPointF(.215, .61), QPointF(.355, 1), QPointF(1, 1)); // As composition of m_easingIn and m_easingOut m_easingInOut = QEasingCurve(QEasingCurve::BezierSpline); m_easingInOut.addCubicBezierSegment(QPointF(.215, .055), QPointF(.355, .19), QPointF(.5, .5)); m_easingInOut.addCubicBezierSegment(QPointF(.55, .61), QPointF(.675, 1), QPointF(1, 1)); // As composition of m_easingIn and m_easingOut m_easingOutIn = QEasingCurve(QEasingCurve::BezierSpline); m_easingOutIn.addCubicBezierSegment(QPointF(.055, .215), QPointF(.19, .355), QPointF(.5, .5)); m_easingOutIn.addCubicBezierSegment(QPointF(.61, .55), QPointF(1, .675), QPointF(1, 1)); } qqc2-suru-style-0.20230206/qqc2-suru/qquicksuruanimations.h000066400000000000000000000053011437021036500234220ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2018 Stefano Verzegnassi ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ #ifndef QQUICKSURUANIMATIONS_H #define QQUICKSURUANIMATIONS_H #include #include #include class QQuickSuruAnimations : public QObject { Q_OBJECT Q_PROPERTY(int SnapDuration READ snapDuration CONSTANT) Q_PROPERTY(int FastDuration READ fastDuration CONSTANT) Q_PROPERTY(int BriskDuration READ briskDuration CONSTANT) Q_PROPERTY(int SlowDuration READ slowDuration CONSTANT) Q_PROPERTY(int SleepyDuration READ sleepyDuration CONSTANT) Q_PROPERTY(QEasingCurve EasingIn READ easingIn CONSTANT) Q_PROPERTY(QEasingCurve EasingOut READ easingOut CONSTANT) Q_PROPERTY(QEasingCurve EasingInOut READ easingInOut CONSTANT) Q_PROPERTY(QEasingCurve EasingOutIn READ easingOutIn CONSTANT) public: explicit QQuickSuruAnimations(QObject *parent = 0); // https://github.com/vanilla-framework/vanilla-framework/blob/develop/scss/_settings_animations.scss int snapDuration() const { return 100; } int fastDuration() const { return 165; } int briskDuration() const { return 333; } int slowDuration() const { return 500; } int sleepyDuration() const { return 1000; } const QEasingCurve &easingIn() const { return m_easingIn; } const QEasingCurve &easingOut() const { return m_easingOut; } const QEasingCurve &easingInOut() const { return m_easingInOut; } const QEasingCurve &easingOutIn() const { return m_easingOutIn; } private: QEasingCurve m_easingIn; QEasingCurve m_easingOut; QEasingCurve m_easingInOut; QEasingCurve m_easingOutIn; }; #endif // QQUICKSURUANIMATIONS_H qqc2-suru-style-0.20230206/qqc2-suru/qquicksurustyle.cpp000066400000000000000000000444701437021036500227650ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ #include "qquicksurustyle_p.h" #include "qquicksuruanimations.h" #include "qquicksuruunits.h" #include #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #include #else #include #endif static QRgb qquicksuru_color(QQuickSuruStyle::Color colorRole) { static const QRgb colors[] = { 0xFF000000, // Black 0xFF111111, // Jet 0xff333333, // Inkstone 0xFF666666, // Graphite 0xFF888888, // Ash 0xFFcdcdcd, // Silk 0xFFf7f7f7, // Porcelain 0xFFffffff, // White 0xFF335280, // Blue 0xFF0e8420, // Green 0xFFc7162b, // Red 0xFFf99b0f, // Yellow 0xFFe95420, // Orange 0xFF762572, // Purple 0xFF19b6ee, // LightBlue 0xFF3eb34f, // LightGreen 0xFFef9928, // LightYellow 0xFFed3146, // LightRed }; return colors[colorRole]; } static QQuickSuruStyle::Theme globalTheme = QQuickSuruStyle::Light; static uint globalColors[2][9] = { // Light theme { qquicksuru_color(QQuickSuruStyle::Green), // lightPositive qquicksuru_color(QQuickSuruStyle::Red), // lightNegative qquicksuru_color(QQuickSuruStyle::Yellow), // lightWarning qquicksuru_color(QQuickSuruStyle::Blue), // lightInformation qquicksuru_color(QQuickSuruStyle::White), // lightHigh qquicksuru_color(QQuickSuruStyle::Porcelain), // lightMidHigh qquicksuru_color(QQuickSuruStyle::Silk), // lightMid qquicksuru_color(QQuickSuruStyle::Graphite), // lightMidLow qquicksuru_color(QQuickSuruStyle::Jet) // lightLow }, // Dark theme { qquicksuru_color(QQuickSuruStyle::LightGreen), // darkPositive qquicksuru_color(QQuickSuruStyle::LightRed), // darkNegative qquicksuru_color(QQuickSuruStyle::LightYellow), // darkWarning qquicksuru_color(QQuickSuruStyle::LightBlue), // darkInformation qquicksuru_color(QQuickSuruStyle::Porcelain), // darkHigh qquicksuru_color(QQuickSuruStyle::Silk), // darkMidHigh qquicksuru_color(QQuickSuruStyle::Graphite), // darkMid qquicksuru_color(QQuickSuruStyle::Inkstone), // darkMidLow qquicksuru_color(QQuickSuruStyle::Jet) // darkLow } }; static bool globalCustoms[2][9] = { { false } }; static const QString settingsFile = QStringLiteral("%1/lomiri-ui-toolkit/theme.ini"); static const QString ubuntuDarkTheme = QStringLiteral("Lomiri.Components.Themes.SuruDark"); static bool qt_is_dark_system_theme() { bool is_dark = false; // TODO make this work on OSs other than Ubuntu Touch QSettings settings(settingsFile.arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)), QSettings::IniFormat); QString themeName = settings.value(QStringLiteral("theme")).toString(); if (themeName == ubuntuDarkTheme) { is_dark = true; } return is_dark; }; static QQuickSuruStyle::Theme qquicksuru_effective_theme(QQuickSuruStyle::Theme theme) { if (theme == QQuickSuruStyle::System) theme = qt_is_dark_system_theme() ? QQuickSuruStyle::Dark : QQuickSuruStyle::Light; return theme; } #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QQuickSuruStyle::QQuickSuruStyle(QObject *parent) : QQuickAttachedObject(parent), #else QQuickSuruStyle::QQuickSuruStyle(QObject *parent) : QQuickStyleAttached(parent), #endif m_explicitTheme(false), m_theme(globalTheme), m_highlightType(InformationHighlight), m_textLevel(Paragraph), m_textStyle(PrimaryText) { m_animations = new QQuickSuruAnimations(this); m_units = new QQuickSuruUnits(this); connect(this, &QQuickSuruStyle::highlightTypeChanged, this, &QQuickSuruStyle::paletteChanged); connect(this, &QQuickSuruStyle::textStyleChanged, this, &QQuickSuruStyle::paletteChanged); m_fileSystemWatcher.addPath(settingsFile.arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation))); connect(&m_fileSystemWatcher, &QFileSystemWatcher::fileChanged, this, &QQuickSuruStyle::systemThemeChanged); for (int i=0; i<2; ++i) { for (int j=0; j<9; ++j) { m_explicits[i][j] = false; m_customs[i][j] = globalCustoms[i][j]; m_colors[i][j] = globalColors[i][j]; } } init(); } QQuickSuruStyle *QQuickSuruStyle::qmlAttachedProperties(QObject *object) { return new QQuickSuruStyle(object); } QQuickSuruStyle::Theme QQuickSuruStyle::theme() const { return m_theme; } void QQuickSuruStyle::setTheme(Theme theme) { if (theme == System) theme = qt_is_dark_system_theme() ? Dark : Light; m_explicitTheme = true; if (m_theme == theme) return; m_theme = theme; propagateTheme(); emit themeChanged(); emit paletteChanged(); } void QQuickSuruStyle::inheritTheme(Theme theme) { if (m_explicitTheme || m_theme == theme) return; m_theme = theme; propagateTheme(); emit themeChanged(); emit paletteChanged(); } void QQuickSuruStyle::propagateTheme() { #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) const auto styles = attachedChildren(); for (QQuickAttachedObject *child : styles) { #else const auto styles = childStyles(); for (QQuickStyleAttached *child : styles) { #endif QQuickSuruStyle *suru = qobject_cast(child); if (suru) suru->inheritTheme(m_theme); } } void QQuickSuruStyle::resetTheme() { if (!m_explicitTheme) return; m_explicitTheme = false; #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QQuickSuruStyle *suru = qobject_cast(attachedParent()); #else QQuickSuruStyle *suru = qobject_cast(parentStyle()); #endif inheritTheme(suru ? suru->theme() : globalTheme); } QQuickSuruStyle::HighlightType QQuickSuruStyle::highlightType() const { return m_highlightType; } void QQuickSuruStyle::setHighlightType(QQuickSuruStyle::HighlightType type) { if (m_highlightType == type) return; m_highlightType = type; emit highlightTypeChanged(); } void QQuickSuruStyle::resetHighlightType() { m_highlightType = InformationHighlight; emit highlightTypeChanged(); } QQuickSuruStyle::TextLevel QQuickSuruStyle::textLevel() const { return m_textLevel; } void QQuickSuruStyle::setTextLevel(QQuickSuruStyle::TextLevel level) { if (m_textLevel == level) return; m_textLevel = level; emit textLevelChanged(); } void QQuickSuruStyle::resetTextLevel() { m_textLevel = Paragraph; emit textLevelChanged(); } QQuickSuruStyle::TextStyle QQuickSuruStyle::textStyle() const { return m_textStyle; } void QQuickSuruStyle::setTextStyle(QQuickSuruStyle::TextStyle style) { if (m_textStyle == style) return; m_textStyle = style; emit textStyleChanged(); } void QQuickSuruStyle::resetTextStyle() { m_textStyle = PrimaryText; emit textStyleChanged(); } void QQuickSuruStyle::inheritPaletteColor(const QQuickSuruStyle::Theme &theme, const QQuickSuruStyle::PaletteColor &paletteColor, QRgb value, bool custom) { if (m_explicits[theme][paletteColor] || m_colors[theme][paletteColor] == value) return; m_customs[theme][paletteColor] = custom; m_colors[theme][paletteColor] = value; propagatePaletteColor(theme, paletteColor); emit paletteChanged(); } void QQuickSuruStyle::propagatePaletteColor(const QQuickSuruStyle::Theme &theme, const QQuickSuruStyle::PaletteColor &paletteColor) { #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) const auto styles = attachedChildren(); for (QQuickAttachedObject *child : styles) { #else const auto styles = childStyles(); for (QQuickStyleAttached *child : styles) { #endif QQuickSuruStyle *suru = qobject_cast(child); if (suru) suru->inheritPaletteColor(theme, paletteColor, m_colors[theme][paletteColor], m_customs[theme][paletteColor]); } } void QQuickSuruStyle::resetPaletteColor(const QQuickSuruStyle::Theme &theme, const QQuickSuruStyle::PaletteColor &paletteColor) { if (!m_explicits[theme][paletteColor]) return; m_customs[theme][paletteColor] = false; m_explicits[theme][paletteColor] = false; #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QQuickSuruStyle *suru = qobject_cast(attachedParent()); #else QQuickSuruStyle *suru = qobject_cast(parentStyle()); #endif if (suru) inheritPaletteColor(theme, paletteColor, suru->m_colors[theme][paletteColor], suru->m_customs[theme][paletteColor]); else inheritPaletteColor(theme, paletteColor, globalColors[theme][paletteColor], false); } void QQuickSuruStyle::systemThemeChanged(const QString &path) { if (m_theme != Dark && m_theme != Light) { // ignore if the current theme is not one of the system ones return; } if (!m_fileSystemWatcher.files().contains(path)) { qWarning() << "System theme settings file removed!"; return; } m_theme = qt_is_dark_system_theme() ? Dark : Light; propagateTheme(); emit themeChanged(); emit paletteChanged(); } QColor QQuickSuruStyle::highlightColor() const { return QColor::fromRgba(m_colors[m_theme][PaletteColor(m_highlightType)]); } QColor QQuickSuruStyle::activeFocusColor() const { return QColor::fromRgba(m_colors[m_theme][InformationHighlight]); } QColor QQuickSuruStyle::overlayColor() const { return color(Black, m_theme == Light ? 0.85 : 0.62); } QColor QQuickSuruStyle::backgroundColor() const { return QColor::fromRgba(m_colors[m_theme][m_theme == Light ? High : Low]); } QColor QQuickSuruStyle::color(QQuickSuruStyle::Color color, qreal opacity) const { QColor c = qquicksuru_color(color); c.setAlphaF(opacity); return c; } QColor QQuickSuruStyle::secondaryBackgroundColor() const { return QColor::fromRgba(m_colors[m_theme][m_theme == Light ? MidHigh : MidLow]); } QColor QQuickSuruStyle::neutralColor() const { return QColor::fromRgba(m_colors[m_theme][Mid]); } QColor QQuickSuruStyle::foregroundColor() const { if (m_textStyle == SecondaryText) return secondaryForegroundColor(); else if (m_textStyle == TertiaryText) return tertiaryForegroundColor(); return primaryForegroundColor(); } QColor QQuickSuruStyle::primaryForegroundColor() const { return QColor::fromRgba(m_colors[m_theme][m_theme == Light ? Low : High]); } QColor QQuickSuruStyle::secondaryForegroundColor() const { QColor c = primaryForegroundColor(); c.setAlphaF(0.8571); return c; } QColor QQuickSuruStyle::tertiaryForegroundColor() const { QColor c = primaryForegroundColor(); c.setAlphaF(0.6429); return c; } #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) void QQuickSuruStyle::attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent) #else void QQuickSuruStyle::parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent) #endif { Q_UNUSED(oldParent); QQuickSuruStyle *suru = qobject_cast(newParent); if (suru) { Theme newTheme = suru->theme(); inheritTheme(newTheme); for (int i = 0; i < PaletteColor::Low; ++i) inheritPaletteColor(newTheme, PaletteColor(i), suru->m_colors[newTheme][i], suru->m_customs[newTheme][i]); } } template static Enum toEnumValue(const QByteArray &value, bool *ok) { QMetaEnum enumeration = QMetaEnum::fromType(); return static_cast(enumeration.keyToValue(value, ok)); } template static QByteArray toEnumKey(Enum key) { QMetaEnum enumeration = QMetaEnum::fromType(); return enumeration.valueToKey(key); } static QByteArray resolveSetting(const QByteArray &env, const QSharedPointer &settings, const QString &name) { QByteArray value = qgetenv(env); if (value.isNull() && !settings.isNull()) value = settings->value(name).toByteArray(); return value; } void QQuickSuruStyle::init() { static bool globalsInitialized = false; if (!globalsInitialized) { #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QSharedPointer settings = QQuickStylePrivate::settings(QStringLiteral("Suru")); #else QSharedPointer settings = QQuickStyleAttached::settings(QStringLiteral("Suru")); #endif bool ok = false; QByteArray themeValue = resolveSetting("QT_QUICK_CONTROLS_SURU_THEME", settings, QStringLiteral("Theme")); Theme themeEnum = toEnumValue(themeValue, &ok); if (ok) globalTheme = m_theme = qquicksuru_effective_theme(themeEnum); else if (!themeValue.isEmpty()) qWarning().nospace().noquote() << "Suru: unknown theme value: " << themeValue; else globalTheme = m_theme = qquicksuru_effective_theme(QQuickSuruStyle::System); initPaletteColor(Light, Positive, "QT_QUICK_CONTROLS_SURU_LIGHT_POSITIVE", settings); initPaletteColor(Light, Negative, "QT_QUICK_CONTROLS_SURU_LIGHT_NEGATIVE", settings); initPaletteColor(Light, Warning, "QT_QUICK_CONTROLS_SURU_LIGHT_WARNING", settings); initPaletteColor(Light, Information, "QT_QUICK_CONTROLS_SURU_LIGHT_INFORMATION", settings); initPaletteColor(Light, High, "QT_QUICK_CONTROLS_SURU_LIGHT_HIGH", settings); initPaletteColor(Light, MidHigh, "QT_QUICK_CONTROLS_SURU_LIGHT_MIDHIGH", settings); initPaletteColor(Light, Mid, "QT_QUICK_CONTROLS_SURU_LIGHT_MID", settings); initPaletteColor(Light, MidLow, "QT_QUICK_CONTROLS_SURU_LIGHT_MIDLOW", settings); initPaletteColor(Light, Low, "QT_QUICK_CONTROLS_SURU_LIGHT_LOW", settings); initPaletteColor(Dark, Positive, "QT_QUICK_CONTROLS_SURU_DARK_POSITIVE", settings); initPaletteColor(Dark, Negative, "QT_QUICK_CONTROLS_SURU_DARK_NEGATIVE", settings); initPaletteColor(Dark, Warning, "QT_QUICK_CONTROLS_SURU_DARK_WARNING", settings); initPaletteColor(Dark, Information, "QT_QUICK_CONTROLS_SURU_DARK_INFORMATION", settings); initPaletteColor(Dark, High, "QT_QUICK_CONTROLS_SURU_DARK_HIGH", settings); initPaletteColor(Dark, MidHigh, "QT_QUICK_CONTROLS_SURU_DARK_MIDHIGH", settings); initPaletteColor(Dark, Mid, "QT_QUICK_CONTROLS_SURU_DARK_MID", settings); initPaletteColor(Dark, MidLow, "QT_QUICK_CONTROLS_SURU_DARK_MIDLOW", settings); initPaletteColor(Dark, Low, "QT_QUICK_CONTROLS_SURU_DARK_LOW", settings); globalsInitialized = true; } #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QQuickAttachedObject::init(); // TODO: lazy init? #else QQuickStyleAttached::init(); // TODO: lazy init? #endif } void QQuickSuruStyle::initPaletteColor(const Theme &theme, const PaletteColor &paletteColor, const QByteArray &env, QSharedPointer settings) { QString name = QString::fromUtf8(toEnumKey(theme)) + QString::fromUtf8(toEnumKey(paletteColor)); QByteArray value = resolveSetting(env, settings, name); bool ok = false; Color colorEnum = toEnumValue(value, &ok); if (ok) { globalCustoms[theme][paletteColor] = m_customs[theme][paletteColor] = false; globalColors[theme][paletteColor] = m_colors[theme][paletteColor] = qquicksuru_color(colorEnum); } else if (!value.isEmpty()) { QColor color(value.constData()); if (color.isValid()) { globalCustoms[theme][paletteColor] = m_customs[theme][paletteColor] = true; globalColors[theme][paletteColor] = m_colors[theme][paletteColor] = color.rgba(); } else { qWarning().nospace().noquote() << "Suru: unknown " << name << " value: " << value; } } } bool QQuickSuruStyle::setPaletteColor(const QVariant &value, const QQuickSuruStyle::Theme &theme, const QQuickSuruStyle::PaletteColor &paletteColor) { QRgb newValue = 0; bool custom = false; QString name = QString::fromUtf8(toEnumKey(theme)).toLower() + QString::fromUtf8(toEnumKey(paletteColor)); if (value.type() == QVariant::Int) { int val = value.toInt(); if (val < Black || val > LightRed) { qmlInfo(parent()) << "unknown Suru." << name << " value: " << val; return false; } newValue = qquicksuru_color(static_cast(val)); } else { int val = QMetaEnum::fromType().keyToValue(value.toByteArray()); if (val != -1) { newValue = qquicksuru_color(static_cast(val)); } else { QColor color(value.toString()); if (!color.isValid()) { qmlInfo(parent()) << "unknown Suru." << name << " value: " << value.toString(); return false; } custom = true; newValue = color.rgba(); } } m_explicits[theme][paletteColor] = true; if (m_colors[theme][paletteColor] == newValue) return false; m_customs[theme][paletteColor] = custom; m_colors[theme][paletteColor] = newValue; propagatePaletteColor(theme, paletteColor); emit paletteChanged(); return true; } qqc2-suru-style-0.20230206/qqc2-suru/qquicksurustyle_p.h000066400000000000000000000207021437021036500227410ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ #ifndef QQUICKSURUSTYLE_P_H #define QQUICKSURUSTYLE_P_H #include "qquicksuruanimations.h" #include "qquicksuruunits.h" #include #if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0) #include #elif QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #include #else #include #endif #include #include #define SURU_PALETTE_COLOR(name, theme, palettecolor) \ Q_PROPERTY(QVariant name READ name WRITE set##name RESET reset##name NOTIFY paletteChanged FINAL) \ public: \ QVariant name() const { return QColor::fromRgba(m_colors[ theme ][ palettecolor ]); } \ void set##name(const QVariant &value) { setPaletteColor(value, theme, palettecolor ); } \ void reset##name() { resetPaletteColor( theme, palettecolor ); } \ private: class QQuickSuruAnimations; class QQuickSuruUnits; #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) class QQuickSuruStyle : public QQuickAttachedObject #else class QQuickSuruStyle : public QQuickStyleAttached #endif { Q_OBJECT // Light or dark theme Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL) SURU_PALETTE_COLOR(lightPositive, Light, Positive) SURU_PALETTE_COLOR(lightNegative, Light, Negative) SURU_PALETTE_COLOR(lightWarning, Light, Warning) SURU_PALETTE_COLOR(lightInformation, Light, Information) SURU_PALETTE_COLOR(lightHigh, Light, High) SURU_PALETTE_COLOR(lightMidHigh, Light, MidHigh) SURU_PALETTE_COLOR(lightMid, Light, Mid) SURU_PALETTE_COLOR(lightMidLow, Light, MidLow) SURU_PALETTE_COLOR(lightLow, Light, Low) SURU_PALETTE_COLOR(darkPositive, Dark, Positive) SURU_PALETTE_COLOR(darkNegative, Dark, Negative) SURU_PALETTE_COLOR(darkWarning, Dark, Warning) SURU_PALETTE_COLOR(darkInformation, Dark, Information) SURU_PALETTE_COLOR(darkHigh, Dark, High) SURU_PALETTE_COLOR(darkMidHigh, Dark, MidHigh) SURU_PALETTE_COLOR(darkMid, Dark, Mid) SURU_PALETTE_COLOR(darkMidLow, Dark, MidLow) SURU_PALETTE_COLOR(darkLow, Dark, Low) // Can be used where 'highlighted' property is provided. It's not propagated to children. // When set, 'highlightColor' property returns {positive|negative|warning|information} color, as defined in Suru palettes. // Default is Highlight. If unset, it's InformationHighlight as well Q_PROPERTY(HighlightType highlightType READ highlightType WRITE setHighlightType RESET resetHighlightType NOTIFY highlightTypeChanged FINAL) Q_PROPERTY(TextLevel textLevel READ textLevel WRITE setTextLevel RESET resetTextLevel NOTIFY textLevelChanged FINAL) Q_PROPERTY(TextStyle textStyle READ textStyle WRITE setTextStyle RESET resetTextStyle NOTIFY textStyleChanged FINAL) // Colors as result from 'theme' + '{dark|light}Palette' properties Q_PROPERTY(QColor highlightColor READ highlightColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor activeFocusColor READ activeFocusColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor overlayColor READ overlayColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor foregroundColor READ foregroundColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor secondaryForegroundColor READ secondaryForegroundColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor tertiaryForegroundColor READ tertiaryForegroundColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor neutralColor READ neutralColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor secondaryBackgroundColor READ secondaryBackgroundColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QQuickSuruAnimations* animations READ animations CONSTANT) Q_PROPERTY(QQuickSuruUnits* units READ units CONSTANT) public: enum Theme { Light, Dark, System }; Q_ENUM(Theme) enum HighlightType { PositiveHighlight, NegativeHighlight, WarningHighlight, InformationHighlight }; Q_ENUM(HighlightType) enum Color { Black, Jet, Inkstone, Graphite, Ash, Silk, Porcelain, White, Blue, Green, Red, Yellow, Orange, Purple, LightBlue, LightGreen, LightYellow, LightRed }; Q_ENUM(Color) enum PaletteColor { Positive, Negative, Warning, Information, High, MidHigh, Mid, MidLow, Low }; Q_ENUM(PaletteColor) enum TextLevel { HeadingOne, HeadingTwo, HeadingThree, Paragraph, Small, Caption, CodeBlock }; Q_ENUM(TextLevel) enum TextStyle { PrimaryText, SecondaryText, TertiaryText }; Q_ENUM(TextStyle) explicit QQuickSuruStyle(QObject *parent = nullptr); static QQuickSuruStyle *qmlAttachedProperties(QObject *object); Theme theme() const; void setTheme(Theme theme); void inheritTheme(Theme theme); void propagateTheme(); void resetTheme(); HighlightType highlightType() const; void setHighlightType(HighlightType type); void resetHighlightType(); TextLevel textLevel() const; void setTextLevel(TextLevel level); void resetTextLevel(); TextStyle textStyle() const; void setTextStyle(TextStyle style); void resetTextStyle(); QColor highlightColor() const; QColor activeFocusColor() const; QColor overlayColor() const; QColor foregroundColor() const; QColor secondaryForegroundColor() const; QColor tertiaryForegroundColor() const; QColor neutralColor() const; QColor secondaryBackgroundColor() const; QColor backgroundColor() const; Q_INVOKABLE QColor color(Color color, qreal opacity = 1.0) const; QQuickSuruAnimations *animations() const { return m_animations; } QQuickSuruUnits *units() const { return m_units; } Q_SIGNALS: void themeChanged(); void highlightTypeChanged(); void textLevelChanged(); void textStyleChanged(); void paletteChanged(); protected: #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent) override; #else void parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent) override; #endif private: void init(); void initPaletteColor(const Theme &theme, const PaletteColor &paletteColor, const QByteArray &env, QSharedPointer settings); bool setPaletteColor(const QVariant &value, const Theme &theme, const PaletteColor &paletteColor); void inheritPaletteColor(const Theme &theme, const PaletteColor &paletteColor, QRgb value, bool custom); void propagatePaletteColor(const Theme &theme, const PaletteColor &paletteColor); void resetPaletteColor(const Theme &theme, const PaletteColor &paletteColor); void systemThemeChanged(const QString &path); QColor primaryForegroundColor() const; bool m_explicitTheme; QQuickSuruStyle::Theme m_theme; HighlightType m_highlightType; TextLevel m_textLevel; TextStyle m_textStyle; bool m_explicits[2][9]; bool m_customs[2][9]; QRgb m_colors[2][9]; QQuickSuruAnimations *m_animations; QQuickSuruUnits *m_units; QFileSystemWatcher m_fileSystemWatcher; }; QML_DECLARE_TYPEINFO(QQuickSuruStyle, QML_HAS_ATTACHED_PROPERTIES) #endif // QQUICKSURUSTYLE_P_H qqc2-suru-style-0.20230206/qqc2-suru/qquicksurutheme.cpp000066400000000000000000000057071437021036500227270ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ #include "qquicksurutheme_p.h" #include "qquicksuruunits.h" #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #include void QQuickSuruTheme::initialize(QQuickTheme *theme) { QQuickSuruUnits suruUnits; theme->setFont(QQuickTheme::System, suruUnits.fontParagraph()); theme->setFont(QQuickTheme::GroupBox, suruUnits.fontSmall()); } #else QQuickSuruTheme::QQuickSuruTheme(QPlatformTheme *theme) : QQuickProxyTheme(theme) { m_suruUnits = new QQuickSuruUnits(); } const QFont *QQuickSuruTheme::font(QPlatformTheme::Font type) const { switch (type) { case QPlatformTheme::GroupBoxTitleFont: return &m_suruUnits->fontSmall(); case QPlatformTheme::ComboMenuItemFont: case QPlatformTheme::TipLabelFont: case QPlatformTheme::TabButtonFont: case QPlatformTheme::SystemFont: case QPlatformTheme::MenuFont: case QPlatformTheme::MenuBarFont: case QPlatformTheme::MenuItemFont: case QPlatformTheme::MessageBoxFont: case QPlatformTheme::LabelFont: case QPlatformTheme::StatusBarFont: case QPlatformTheme::TitleBarFont: case QPlatformTheme::MdiSubWindowTitleFont: case QPlatformTheme::DockWidgetTitleFont: case QPlatformTheme::PushButtonFont: case QPlatformTheme::CheckBoxFont: case QPlatformTheme::RadioButtonFont: case QPlatformTheme::ToolButtonFont: case QPlatformTheme::ItemViewFont: case QPlatformTheme::ListViewFont: case QPlatformTheme::HeaderViewFont: case QPlatformTheme::ListBoxFont: case QPlatformTheme::ComboLineEditFont: case QPlatformTheme::SmallFont: case QPlatformTheme::MiniFont: case QPlatformTheme::FixedFont: case QPlatformTheme::EditorFont: case QPlatformTheme::NFonts: default: return &m_suruUnits->fontParagraph(); } } #endif qqc2-suru-style-0.20230206/qqc2-suru/qquicksurutheme_p.h000066400000000000000000000034331437021036500227050ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ #ifndef QQUICKSURUTHEME_P_H #define QQUICKSURUTHEME_P_H #include #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #include class QQuickTheme; class QQuickSuruTheme { public: static void initialize(QQuickTheme *theme); }; #else #include #include class QQuickSuruUnits; class QQuickSuruTheme : public QQuickProxyTheme { public: explicit QQuickSuruTheme(QPlatformTheme *theme = nullptr); const QFont *font(Font type = SystemFont) const override; private: QQuickSuruUnits *m_suruUnits; }; #endif #endif // QQUICKSURUTHEME_P_H qqc2-suru-style-0.20230206/qqc2-suru/qquicksuruunits.cpp000066400000000000000000000101761437021036500227630ustar00rootroot00000000000000#include "qquicksuruunits.h" #include "qquicksurustyle_p.h" #include #include #include #include #define SURU_FONT_SIZE_MULTIPLIER 0.875 #define ENV_GRID_UNIT_PX "GRID_UNIT_PX" #define DEFAULT_GRID_UNIT_PX 8 static float getenvFloat(const char* name, float defaultValue) { QByteArray stringValue = qgetenv(name); bool ok; float value = stringValue.toFloat(&ok); return ok ? value : defaultValue; } QQuickSuruUnits::QQuickSuruUnits(QObject *parent) : QObject(parent), m_devicePixelRatio(qGuiApp->devicePixelRatio()) { // TODO recalculate based on window/devicePixelRatio changes like the ubuntu uitk if (QHighDpiScaling::isActive()) { m_gridUnit = qCeil(DEFAULT_GRID_UNIT_PX * m_devicePixelRatio); } else { m_gridUnit = getenvFloat(ENV_GRID_UNIT_PX, DEFAULT_GRID_UNIT_PX * m_devicePixelRatio); } setupFonts(); } void QQuickSuruUnits::setupFonts() { m_headingOne.setPixelSize(dp(32) * SURU_FONT_SIZE_MULTIPLIER); m_headingOne.setWeight(QFont::Light); m_headingTwo.setPixelSize(dp(24) * SURU_FONT_SIZE_MULTIPLIER); m_headingTwo.setWeight(QFont::Light); m_headingThree.setPixelSize(dp(22) * SURU_FONT_SIZE_MULTIPLIER); m_headingThree.setWeight(QFont::Light); m_paragraph.setPixelSize(dp(16) * SURU_FONT_SIZE_MULTIPLIER); m_paragraph.setWeight(QFont::Light); m_small.setPixelSize(dp(14) * SURU_FONT_SIZE_MULTIPLIER); m_small.setWeight(QFont::Light); m_caption.setPixelSize(dp(14) * SURU_FONT_SIZE_MULTIPLIER); m_caption.setWeight(QFont::Light); m_caption.setItalic(true); m_codeBlock.setPixelSize(dp(16) * SURU_FONT_SIZE_MULTIPLIER); m_codeBlock.setWeight(QFont::Light); const QFont font(QStringLiteral("Ubuntu")); if (QFontInfo(font).family() == QStringLiteral("Ubuntu")) { const QString family = font.family(); m_headingOne.setFamily(family); m_headingTwo.setFamily(family); m_headingThree.setFamily(family); m_paragraph.setFamily(family); m_small.setFamily(family); m_caption.setFamily(family); } const QFont monoFont(QStringLiteral("Ubuntu Mono")); if (QFontInfo(monoFont).family() == QStringLiteral("Ubuntu Mono")) { const QString family = monoFont.family(); m_codeBlock.setFamily(family); } emit fontsChanged(); } int QQuickSuruUnits::gu(qreal value) const { return qRound(value * m_gridUnit) / m_devicePixelRatio; } int QQuickSuruUnits::dp(qreal value) const { if (QHighDpiScaling::isActive()) { return value; } else { const qreal ratio = m_gridUnit / DEFAULT_GRID_UNIT_PX; if (value <= 2.0) { // for values under 2dp, return only multiples of the value return qRound(value * qFloor(ratio)) / m_devicePixelRatio; } else { return qRound(value * ratio) / m_devicePixelRatio; } } } int QQuickSuruUnits::rem(qreal value) const { return value * qreal(m_paragraph.pixelSize()); } int QQuickSuruUnits::applyLabelTopPadding(const int previousBlockLevel = QQuickSuruStyle::Paragraph) const { int prevBlockLevel = previousBlockLevel; if (prevBlockLevel < QQuickSuruStyle::HeadingOne || prevBlockLevel > QQuickSuruStyle::CodeBlock) { prevBlockLevel = QQuickSuruStyle::Paragraph; } QQuickSuruStyle *style = qobject_cast(this->parent()); if (style) { switch (style->textLevel()) { case QQuickSuruStyle::HeadingOne: return rem(2); case QQuickSuruStyle::HeadingTwo: case QQuickSuruStyle::HeadingThree: return rem(1.5); case QQuickSuruStyle::Paragraph: return (prevBlockLevel == QQuickSuruStyle::HeadingOne || prevBlockLevel == QQuickSuruStyle::Paragraph) ? rem(1) : rem(0.5); case QQuickSuruStyle::Small: case QQuickSuruStyle::Caption: return rem(1); case QQuickSuruStyle::CodeBlock: return rem(1.25); default: // Likely, we'll never get here. return 0; } } return 0; } qqc2-suru-style-0.20230206/qqc2-suru/qquicksuruunits.h000066400000000000000000000045521437021036500224310ustar00rootroot00000000000000#ifndef QQUICKSURUUNITS_H #define QQUICKSURUUNITS_H #include #include #include class QQuickSuruUnits : public QObject { Q_OBJECT Q_PROPERTY(int breakpointXSmall READ breakpointXSmall CONSTANT) Q_PROPERTY(int breakpointSmall READ breakpointSmall CONSTANT) Q_PROPERTY(int breakpointMedium READ breakpointMedium CONSTANT) Q_PROPERTY(int breakpointLarge READ breakpointLarge CONSTANT) Q_PROPERTY(QFont fontHeadingOne READ fontHeadingOne NOTIFY fontsChanged) Q_PROPERTY(QFont fontHeadingTwo READ fontHeadingTwo NOTIFY fontsChanged) Q_PROPERTY(QFont fontHeadingThree READ fontHeadingThree NOTIFY fontsChanged) Q_PROPERTY(QFont fontParagraph READ fontParagraph NOTIFY fontsChanged) Q_PROPERTY(QFont fontSmall READ fontSmall NOTIFY fontsChanged) Q_PROPERTY(QFont fontCaption READ fontCaption NOTIFY fontsChanged) Q_PROPERTY(QFont fontCodeBlock READ fontCodeBlock NOTIFY fontsChanged) public: explicit QQuickSuruUnits(QObject *parent = 0); // Breakpoints for responsive UI int breakpointXSmall() const { return gu(56); } int breakpointSmall() const { return gu(80); } int breakpointMedium() const { return gu(96); } int breakpointLarge() const { return gu(128); } const QFont &fontHeadingOne() const { return m_headingOne; } const QFont &fontHeadingTwo() const { return m_headingTwo; } const QFont &fontHeadingThree() const { return m_headingThree; } const QFont &fontParagraph() const { return m_paragraph; } const QFont &fontSmall() const { return m_small; } const QFont &fontCaption() const { return m_caption; } const QFont &fontCodeBlock() const { return m_codeBlock; } // 1 rem * 0.5 = 8px. Used for convenience. Q_INVOKABLE int gu(qreal value) const; // Used for font-indipendent sizes. = 1 px Q_INVOKABLE int dp(qreal value) const; // The size of the paragraph font, in px. = 16 px Q_INVOKABLE int rem(qreal value) const; Q_INVOKABLE int applyLabelTopPadding(const int previousBlockLevel) const; signals: void fontsChanged(); private: void setupFonts(); QFont m_headingOne; QFont m_headingTwo; QFont m_headingThree; QFont m_paragraph; QFont m_small; QFont m_caption; QFont m_codeBlock; float m_devicePixelRatio; float m_gridUnit; }; #endif // QQUICKSURUUNITS_H qqc2-suru-style-0.20230206/qqc2-suru/qtquickcontrols2surustyleplugin.cpp000066400000000000000000000071201437021036500262250ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2017, 2018 Stefano Verzegnassi ** Copyright (C) 2017 The Qt Company Ltd. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** ****************************************************************************/ #include #include "qquicksurustyle_p.h" #include "qquicksurutheme_p.h" #include "qquicksuruanimations.h" #include "qquicksuruunits.h" #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #include #else #include static inline void initResources() { Q_INIT_RESOURCE(qtquickcontrols2surustyleplugin); #ifdef QT_STATIC Q_INIT_RESOURCE(qmake_QtQuick_Controls_2_Suru); #endif } #endif class QtQuickControls2SuruStylePlugin: public QQuickStylePlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: QtQuickControls2SuruStylePlugin(QObject *parent = nullptr); void registerTypes(const char *uri) override; #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #else void initializeEngine(QQmlEngine *engine, const char *uri) override; #endif QString name() const override; #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) void initializeTheme(QQuickTheme *theme) override; #else QQuickProxyTheme *createTheme() const override; #endif }; QtQuickControls2SuruStylePlugin::QtQuickControls2SuruStylePlugin(QObject *parent) : QQuickStylePlugin(parent) { #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #else initResources(); #endif } void QtQuickControls2SuruStylePlugin::registerTypes(const char *uri) { qmlRegisterModule(uri, 2, 2); qmlRegisterUncreatableType(uri, 2, 2, "Suru", tr("Suru is an attached property")); qmlRegisterUncreatableType(uri, 2, 2, "SuruAnimations", tr("Not instantiable")); qmlRegisterUncreatableType(uri, 2, 2, "SuruUnits", tr("Not instantiable")); } #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #else void QtQuickControls2SuruStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri) { QQuickStylePlugin::initializeEngine(engine, uri); engine->addImageProvider(name(), new QQuickColorImageProvider(QStringLiteral(":/qt-project.org/imports/QtQuick/Controls.2/Suru/assets"))); } #endif QString QtQuickControls2SuruStylePlugin::name() const { return QStringLiteral("suru"); } #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) void QtQuickControls2SuruStylePlugin::initializeTheme(QQuickTheme *theme) { QQuickSuruTheme::initialize(theme); } #else QQuickProxyTheme *QtQuickControls2SuruStylePlugin::createTheme() const { return new QQuickSuruTheme; } #endif #include "qtquickcontrols2surustyleplugin.moc" qqc2-suru-style-0.20230206/qqc2-suru/qtquickcontrols2surustyleplugin.qrc000066400000000000000000000022371437021036500262340ustar00rootroot00000000000000 assets/spinner.svg assets/checkmark.png assets/checkmark@2.png assets/checkmark@3.png assets/checkmark@4.png assets/checkmark-undefined.png assets/checkmark-undefined@2.png assets/checkmark-undefined@3.png assets/checkmark-undefined@4.png assets/down.png assets/down@2.png assets/down@3.png assets/down@4.png assets/up.png assets/up@2.png assets/up@3.png assets/up@4.png assets/leftarrow.png assets/leftarrow@2.png assets/leftarrow@3.png assets/leftarrow@4.png assets/rightarrow.png assets/rightarrow@2.png assets/rightarrow@3.png assets/rightarrow@4.png qqc2-suru-style-0.20230206/qqc2-suru/suru.pri000066400000000000000000000033401437021036500204650ustar00rootroot00000000000000# Internal implementation files QML_FILES += \ $$PWD/impl/CheckIndicator.qml \ $$PWD/impl/CursorDelegate.qml \ $$PWD/impl/ElevationEffect.qml \ $$PWD/impl/HighlightFocusRectangle.qml \ $$PWD/impl/RadioIndicator.qml \ $$PWD/impl/SwitchIndicator.qml # Suru QtQuick Controls 2.x Style files QML_FILES += \ $$PWD/ApplicationWindow.qml \ $$PWD/BusyIndicator.qml \ $$PWD/Button.qml \ $$PWD/CheckBox.qml \ $$PWD/CheckDelegate.qml \ $$PWD/ComboBox.qml \ $$PWD/DelayButton.qml \ $$PWD/Dial.qml \ $$PWD/Dialog.qml \ $$PWD/DialogButtonBox.qml \ $$PWD/Drawer.qml \ $$PWD/Frame.qml \ $$PWD/GroupBox.qml \ $$PWD/ItemDelegate.qml \ $$PWD/Label.qml \ $$PWD/Menu.qml \ $$PWD/MenuItem.qml \ $$PWD/MenuSeparator.qml \ $$PWD/Page.qml \ $$PWD/PageIndicator.qml \ $$PWD/Pane.qml \ $$PWD/Popup.qml \ $$PWD/ProgressBar.qml \ $$PWD/RadioButton.qml \ $$PWD/RadioDelegate.qml \ $$PWD/RangeSlider.qml \ $$PWD/RoundButton.qml \ $$PWD/ScrollBar.qml \ $$PWD/ScrollIndicator.qml \ $$PWD/Slider.qml \ $$PWD/SpinBox.qml \ $$PWD/StackView.qml \ $$PWD/SwipeDelegate.qml \ $$PWD/SwitchDelegate.qml \ $$PWD/Switch.qml \ $$PWD/TabBar.qml \ $$PWD/TabButton.qml \ $$PWD/TextArea.qml \ $$PWD/TextField.qml \ $$PWD/ToolBar.qml \ $$PWD/ToolButton.qml \ $$PWD/ToolSeparator.qml \ $$PWD/ToolTip.qml \ $$PWD/Tumbler.qml HEADERS += \ $$PWD/qquicksurustyle_p.h \ $$PWD/qquicksurutheme_p.h \ $$PWD/qquicksuruanimations.h \ $$PWD/qquicksuruunits.h SOURCES += \ $$PWD/qquicksurustyle.cpp \ $$PWD/qquicksurutheme.cpp \ $$PWD/qquicksuruanimations.cpp \ $$PWD/qquicksuruunits.cpp qqc2-suru-style-0.20230206/qqc2-suru/suru.pro000066400000000000000000000015311437021036500204730ustar00rootroot00000000000000TARGET = qtquickcontrols2surustyleplugin TARGETPATH = QtQuick/Controls.2/Suru IMPORT_VERSION = 2.2 uri = QtQuick.Controls.Suru QT += gui qml quick QT_PRIVATE += quickcontrols2-private quick-private quicktemplates2-private equals(QT_MAJOR_VERSION, 6) { QT_PRIVATE += quickcontrols2impl-private } DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII include(suru.pri) OTHER_FILES += \ qmldir \ $$QML_FILES SOURCES += \ $$PWD/qtquickcontrols2surustyleplugin.cpp RESOURCES += \ $$PWD/qtquickcontrols2surustyleplugin.qrc # Qt 5.9 does not install *.qml files with the flags required for newer Qt versions equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 12) { !static: CONFIG += qmlcache CONFIG += no_cxx_module } else { CONFIG += no_cxx_module install_qml_files builtin_resources qtquickcompiler } load(qml_plugin) qqc2-suru-style-0.20230206/suru.pro000066400000000000000000000000621437021036500166270ustar00rootroot00000000000000TEMPLATE = subdirs SUBDIRS += qqc2-suru/suru.pro