mirror of
https://github.com/UN-GCPDS/qt-material.git
synced 2025-01-27 17:02:57 +08:00
Added fonts
This commit is contained in:
parent
84d68853f9
commit
c9f12688c4
@ -1,6 +1,7 @@
|
||||
exclude pyside_material/resources/generate.py
|
||||
recursive-include pyside_material *.css.template
|
||||
recursive-include pyside_material/themes *.xml
|
||||
recursive-include pyside_material/fonts *.ttf
|
||||
recursive-exclude * __pycache__
|
||||
recursive-exclude * *.py[co]
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
PySide Material
|
||||
===============
|
||||
|
||||
This is another stylesheet for PySide, this time looks like Material.
|
||||
This is another stylesheet for PySide, this time looks like Material Design.
|
||||
|
||||
|
||||
There is some custom dark themes:
|
||||
|
@ -1,5 +1,6 @@
|
||||
import os
|
||||
import logging
|
||||
from PySide2.QtGui import QFontDatabase
|
||||
|
||||
import jinja2
|
||||
# from jinja2 import Template
|
||||
@ -26,7 +27,8 @@ def build_stylesheet(theme='', light_secondary=False, resources=[], extra={}):
|
||||
theme = get_theme(theme, light_secondary)
|
||||
set_icons_theme(theme)
|
||||
|
||||
loader = jinja2.FileSystemLoader(os.path.join(os.path.dirname(os.path.abspath(__file__))))
|
||||
loader = jinja2.FileSystemLoader(os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__))))
|
||||
env = jinja2.Environment(autoescape=True, loader=loader)
|
||||
|
||||
theme['icon'] = None
|
||||
@ -42,20 +44,24 @@ def build_stylesheet(theme='', light_secondary=False, resources=[], extra={}):
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
def get_theme(theme, light_secondary=False):
|
||||
if theme in ['default.xml', 'default_dark.xml']:
|
||||
default_theme = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'themes', 'dark_teal.xml')
|
||||
elif theme in ['default_light.xml']:
|
||||
def get_theme(theme_name, light_secondary=False):
|
||||
if theme_name in ['default.xml', 'default_dark.xml']:
|
||||
default_theme = os.path.join(os.path.dirname(
|
||||
os.path.abspath(__file__)), 'themes', 'dark_teal.xml')
|
||||
elif theme_name in ['default_light.xml']:
|
||||
light_secondary = True
|
||||
default_theme = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'themes', 'light_blue.xml')
|
||||
default_theme = os.path.join(os.path.dirname(
|
||||
os.path.abspath(__file__)), 'themes', 'light_blue.xml')
|
||||
|
||||
if not os.path.exists(theme):
|
||||
if not os.path.exists(theme_name):
|
||||
|
||||
theme = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'themes', theme)
|
||||
theme = os.path.join(os.path.dirname(
|
||||
os.path.abspath(__file__)), 'themes', theme_name)
|
||||
if not os.path.exists(theme):
|
||||
|
||||
if theme:
|
||||
logging.warning(f"{theme} not exist, using {default_theme} by default.")
|
||||
logging.warning(
|
||||
f"{theme} not exist, using {default_theme} by default.")
|
||||
|
||||
theme = default_theme
|
||||
|
||||
@ -66,15 +72,37 @@ def get_theme(theme, light_secondary=False):
|
||||
os.environ[str(k)] = theme[k]
|
||||
|
||||
if light_secondary:
|
||||
theme['secondaryColor'], theme['secondaryLightColor'], theme['secondaryDarkColor'] = theme['secondaryColor'], theme['secondaryDarkColor'], theme['secondaryLightColor']
|
||||
theme['secondaryColor'], theme['secondaryLightColor'], theme['secondaryDarkColor'] = theme[
|
||||
'secondaryColor'], theme['secondaryDarkColor'], theme['secondaryLightColor']
|
||||
# 'secondaryColor': '#fafafa', 'secondaryLightColor': '#ffffff', 'secondaryDarkColor': '#c7c7c7'
|
||||
|
||||
for color in ['primaryColor',
|
||||
'primaryLightColor',
|
||||
'primaryDarkColor',
|
||||
'secondaryColor',
|
||||
'secondaryLightColor',
|
||||
'secondaryDarkColor',
|
||||
'primaryTextColor',
|
||||
'secondaryTextColor']:
|
||||
os.environ[f'PYSIDEMATERIAL_{color.upper()}'] = theme[color]
|
||||
os.environ['PYSIDEMATERIAL_THEME'] = theme_name
|
||||
|
||||
return theme
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
def add_fonts():
|
||||
""""""
|
||||
fonts_path = os.path.join(os.path.dirname(__file__), 'fonts')
|
||||
for font in os.listdir(fonts_path):
|
||||
QFontDatabase.addApplicationFont(os.path.join(fonts_path, font))
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
def apply_stylesheet(app, theme='', style='Fusion', save_as=None, light_secondary=False, resources=[], extra={}):
|
||||
""""""
|
||||
add_fonts()
|
||||
|
||||
if style:
|
||||
app.setStyle(style)
|
||||
stylesheet = build_stylesheet(theme, light_secondary, resources, extra)
|
||||
@ -104,7 +132,8 @@ def set_icons_theme(theme, resource=None, overwrite=False):
|
||||
pass
|
||||
|
||||
if resource is None:
|
||||
resource = os.path.join(os.path.dirname(os.path.abspath(__file__)), _resource)
|
||||
resource = os.path.join(os.path.dirname(
|
||||
os.path.abspath(__file__)), _resource)
|
||||
# else:
|
||||
# rsc =
|
||||
|
||||
@ -119,7 +148,8 @@ def set_icons_theme(theme, resource=None, overwrite=False):
|
||||
)
|
||||
|
||||
for color, replace in replaces:
|
||||
colors = [color] + [''.join(list(color)[:i] + ['\\\n'] + list(color)[i:]) for i in range(1, 7)]
|
||||
colors = [
|
||||
color] + [''.join(list(color)[:i] + ['\\\n'] + list(color)[i:]) for i in range(1, 7)]
|
||||
for c in colors:
|
||||
content = content.replace(c, theme[replace])
|
||||
|
||||
@ -135,6 +165,7 @@ def set_icons_theme(theme, resource=None, overwrite=False):
|
||||
# ----------------------------------------------------------------------
|
||||
def list_themes():
|
||||
""""""
|
||||
themes = os.listdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'themes'))
|
||||
themes = os.listdir(os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)), 'themes'))
|
||||
themes = filter(lambda a: a.endswith('xml'), themes)
|
||||
return list(themes)
|
||||
|
203
pyside_material/fonts/Apache License.txt
Normal file
203
pyside_material/fonts/Apache License.txt
Normal file
@ -0,0 +1,203 @@
|
||||
Font data copyright Google 2012
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
BIN
pyside_material/fonts/Roboto-Black.ttf
Normal file
BIN
pyside_material/fonts/Roboto-Black.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-BlackItalic.ttf
Normal file
BIN
pyside_material/fonts/Roboto-BlackItalic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-Bold.ttf
Normal file
BIN
pyside_material/fonts/Roboto-Bold.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-BoldItalic.ttf
Normal file
BIN
pyside_material/fonts/Roboto-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-Italic.ttf
Normal file
BIN
pyside_material/fonts/Roboto-Italic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-Light.ttf
Normal file
BIN
pyside_material/fonts/Roboto-Light.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-LightItalic.ttf
Normal file
BIN
pyside_material/fonts/Roboto-LightItalic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-Medium.ttf
Normal file
BIN
pyside_material/fonts/Roboto-Medium.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-MediumItalic.ttf
Normal file
BIN
pyside_material/fonts/Roboto-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-Regular.ttf
Normal file
BIN
pyside_material/fonts/Roboto-Regular.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-Thin.ttf
Normal file
BIN
pyside_material/fonts/Roboto-Thin.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/Roboto-ThinItalic.ttf
Normal file
BIN
pyside_material/fonts/Roboto-ThinItalic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/RobotoCondensed-Bold.ttf
Normal file
BIN
pyside_material/fonts/RobotoCondensed-Bold.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/RobotoCondensed-BoldItalic.ttf
Normal file
BIN
pyside_material/fonts/RobotoCondensed-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/RobotoCondensed-Italic.ttf
Normal file
BIN
pyside_material/fonts/RobotoCondensed-Italic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/RobotoCondensed-Light.ttf
Normal file
BIN
pyside_material/fonts/RobotoCondensed-Light.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/RobotoCondensed-LightItalic.ttf
Normal file
BIN
pyside_material/fonts/RobotoCondensed-LightItalic.ttf
Normal file
Binary file not shown.
BIN
pyside_material/fonts/RobotoCondensed-Regular.ttf
Normal file
BIN
pyside_material/fonts/RobotoCondensed-Regular.ttf
Normal file
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
font-family: Roboto;
|
||||
/*font-size: 13px;*/
|
||||
line-height: 13px;
|
||||
/*font-weight: 400;*/
|
||||
/*font-weight: "Light";*/
|
||||
|
||||
selection-background-color: {{primaryLightColor}};
|
||||
selection-color: {{secondaryColor}};
|
||||
@ -17,7 +17,7 @@ QWidget {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*.QWebEngineView,*/
|
||||
.QFrame {
|
||||
background-color: {{secondaryDarkColor}};
|
||||
border: 1px solid {{secondaryColor}};
|
||||
@ -32,8 +32,8 @@ QFrame {
|
||||
|
||||
.QStatusBar {
|
||||
color: {{secondaryTextColor}};
|
||||
background-color: {{secondaryColor}};
|
||||
border: 0px solid {{secondaryColor}};
|
||||
background-color: {{secondaryDarkColor}};
|
||||
border: 0px solid {{secondaryDarkColor}};
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
@ -575,7 +575,7 @@ QDockWidget::title {
|
||||
/*text-transform: uppercase;*/
|
||||
/*border-top: 5px solid {{secondaryDarkColor}};*/
|
||||
text-align: left;
|
||||
background-color: {{secondaryColor}};
|
||||
background-color: {{secondaryColor|opacity(0.3)}};
|
||||
padding-left: 35px;
|
||||
padding: 3px;
|
||||
margin-top: 4px;
|
||||
@ -855,11 +855,19 @@ border-color: red;
|
||||
}
|
||||
|
||||
|
||||
/*QMdiArea{*/
|
||||
|
||||
/*background-color:{{secondaryColor}};*/
|
||||
/*background:{{secondaryColor}};*/
|
||||
|
||||
/*}*/
|
||||
|
||||
QMdiSubWindow{
|
||||
|
||||
/*border-radius: 2px;*/
|
||||
/*border-color: {{secondaryLightColor}};*/
|
||||
/*background: {{secondaryColor}};*/
|
||||
/*background-color: {{secondaryColor}};*/
|
||||
/*border: 1px solid {{secondaryLightColor}};*/
|
||||
|
||||
}
|
||||
@ -1056,3 +1064,11 @@ QTableView > QHeaderView::section:last {
|
||||
QTableView {
|
||||
alternate-background-color: {{secondaryColor|opacity(0.7)}};
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*QGroupBox {*/
|
||||
|
||||
/*background-color: {{secondaryColor|opacity(0.5)}};*/
|
||||
|
||||
/*}*/
|
||||
|
@ -3,9 +3,11 @@
|
||||
<color name="primaryColor">#4dd0e1</color>
|
||||
<color name="primaryLightColor">#88ffff</color>
|
||||
<color name="primaryDarkColor">#009faf</color>
|
||||
<color name="secondaryColor">#263238</color>
|
||||
<!--<color name="secondaryColor">#263238</color>-->
|
||||
<color name="secondaryColor">#232629</color>
|
||||
<color name="secondaryLightColor">#4f5b62</color>
|
||||
<color name="secondaryDarkColor">#000a12</color>
|
||||
<!--<color name="secondaryDarkColor">#000a12</color>-->
|
||||
<color name="secondaryDarkColor">#31363b</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#ffffff</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#c79400</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#004ecb</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#00b2cc</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -3,9 +3,9 @@
|
||||
<color name="primaryColor">#00bcd4</color>
|
||||
<color name="primaryLightColor">#62efff</color>
|
||||
<color name="primaryDarkColor">#008ba3</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryColor">#f5f5f5</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#1faa00</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#c60055</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#aa00c7</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#c4001d</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#00b686</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<color name="primaryDarkColor">#c7b800</color>
|
||||
<color name="secondaryColor">#eeeeee</color>
|
||||
<color name="secondaryLightColor">#ffffff</color>
|
||||
<color name="secondaryDarkColor">#bcbcbc</color>
|
||||
<color name="secondaryDarkColor">#e6e6e6</color>
|
||||
<color name="primaryTextColor">#000000</color>
|
||||
<color name="secondaryTextColor">#424242</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
</resources>
|
||||
|
2
setup.py
2
setup.py
@ -9,7 +9,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
|
||||
|
||||
setup(
|
||||
name='pyside-material',
|
||||
version='1.11',
|
||||
version='1.12',
|
||||
packages=['pyside_material', 'pyside_material.resources'],
|
||||
|
||||
author='Yeison Cardona',
|
||||
|
@ -28,15 +28,16 @@ if __name__ == "__main__":
|
||||
QTimer.singleShot(T0 * 2, app.closeAllWindows)
|
||||
except:
|
||||
# theme = 'light_blue'
|
||||
# theme = 'light_cyan_500'
|
||||
theme = 'default'
|
||||
|
||||
app.setStyleSheet("")
|
||||
|
||||
|
||||
extra = {'danger': '#dc3545',
|
||||
'warning': '#ffc107',
|
||||
'success': '#17a2b8', }
|
||||
apply_stylesheet(app, theme=f'{theme}.xml', light_secondary=theme.startswith('light'), save_as='material.qss', extra=extra)
|
||||
apply_stylesheet(app, theme=f'{theme}.xml', light_secondary=theme.startswith(
|
||||
'light'), save_as='material.qss', extra=extra)
|
||||
|
||||
frame = QUiLoader().load('main_window.ui')
|
||||
frame.show()
|
||||
|
@ -155,19 +155,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>114</width>
|
||||
<height>107</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSlider" name="verticalSlider_2">
|
||||
<property name="value">
|
||||
@ -188,6 +175,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>114</width>
|
||||
<height>107</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_6"/>
|
||||
@ -334,7 +334,8 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="media-playback-start"/>
|
||||
<iconset theme="media-playback-start">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
@ -451,7 +452,7 @@
|
||||
<enum>QTabWidget::East</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="tabsClosable">
|
||||
<bool>true</bool>
|
||||
@ -478,7 +479,17 @@
|
||||
<attribute name="label">
|
||||
<string>Page 1</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_14"/>
|
||||
<layout class="QGridLayout" name="gridLayout_14">
|
||||
<item row="0" column="0">
|
||||
<widget class="QWebEngineView" name="webEngineView">
|
||||
<property name="url">
|
||||
<url>
|
||||
<string>https://www.python.org/</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_3">
|
||||
<property name="geometry">
|
||||
@ -867,6 +878,11 @@
|
||||
<attribute name="title">
|
||||
<string>Long Page Name</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_23">
|
||||
<item row="0" column="0">
|
||||
<widget class="QMdiArea" name="mdiArea"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1434,6 +1450,13 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QWebEngineView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">QtWebEngineWidgets/QWebEngineView</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="pyside_material/resources/resource.qrc"/>
|
||||
</resources>
|
||||
|
@ -3,9 +3,9 @@
|
||||
font-family: Roboto;
|
||||
/*font-size: 13px;*/
|
||||
line-height: 13px;
|
||||
/*font-weight: 400;*/
|
||||
/*font-weight: "Light";*/
|
||||
|
||||
selection-background-color: #ff616f;
|
||||
selection-background-color: #6effe8;
|
||||
selection-color: #263238;
|
||||
|
||||
}
|
||||
@ -17,7 +17,7 @@ QWidget {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*.QWebEngineView,*/
|
||||
.QFrame {
|
||||
background-color: #000a12;
|
||||
border: 1px solid #263238;
|
||||
@ -32,8 +32,8 @@ QFrame {
|
||||
|
||||
.QStatusBar {
|
||||
color: #ffffff;
|
||||
background-color: #263238;
|
||||
border: 0px solid #263238;
|
||||
background-color: #000a12;
|
||||
border: 0px solid #000a12;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
@ -55,9 +55,9 @@ QTextEdit,
|
||||
QComboBox,
|
||||
QPushButton {
|
||||
|
||||
color: #ff1744;
|
||||
color: #1de9b6;
|
||||
background-color: #000a12;
|
||||
border: 1px solid #ff1744;
|
||||
border: 1px solid #1de9b6;
|
||||
border-radius: 4px;
|
||||
padding: 8px 16px ;
|
||||
height: 18px;
|
||||
@ -73,9 +73,9 @@ QComboBox:disabled,
|
||||
QPushButton:disabled
|
||||
{
|
||||
|
||||
color: rgba(255, 23, 68, 0.2);
|
||||
color: rgba(29, 233, 182, 0.2);
|
||||
background-color: rgba(38, 50, 56, 0.75);
|
||||
border: 2px solid rgba(255, 23, 68, 0.2);
|
||||
border: 2px solid rgba(29, 233, 182, 0.2);
|
||||
border-width: 0 0 2px 0;
|
||||
border-radius: 4px;
|
||||
padding: 8px 16px ;
|
||||
@ -97,7 +97,7 @@ QComboBox {
|
||||
height: 18px;
|
||||
/*font-weight: bold;*/
|
||||
|
||||
color: #ff1744;
|
||||
color: #1de9b6;
|
||||
padding-left: 15px;
|
||||
border-radius: 0px;
|
||||
background-color: #263238;
|
||||
@ -112,7 +112,7 @@ QComboBox {
|
||||
|
||||
QComboBox[frame='false'] {
|
||||
|
||||
color: #ff1744;
|
||||
color: #1de9b6;
|
||||
background-color: transparent;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
@ -153,7 +153,7 @@ QPushButton{
|
||||
|
||||
QComboBox::drop-down {
|
||||
border: none;
|
||||
color: #c4001d;
|
||||
color: #00b686;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
@ -169,7 +169,7 @@ QComboBox::down-arrow:disabled {
|
||||
|
||||
|
||||
QComboBox QAbstractItemView {
|
||||
border: 1px solid #c4001d;
|
||||
border: 1px solid #00b686;
|
||||
border-radius: 4px;
|
||||
/*margin-top: 0px;*/
|
||||
|
||||
@ -190,13 +190,13 @@ QComboBox::item:disabled {
|
||||
|
||||
QComboBox::item:selected {
|
||||
color: #000a12;
|
||||
background-color: #ff1744;
|
||||
background-color: #1de9b6;
|
||||
}
|
||||
|
||||
|
||||
QComboBox::item:selected:disabled {
|
||||
color: rgba(0, 10, 18, 0.3);
|
||||
background-color: #ff1744;
|
||||
background-color: #1de9b6;
|
||||
}
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ QPushButton:checked,
|
||||
QPushButton:pressed {
|
||||
|
||||
color: #000a12;
|
||||
background-color: #ff1744;
|
||||
background-color: #1de9b6;
|
||||
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ QPushButton:flat {
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
|
||||
color: #ff1744;
|
||||
color: #1de9b6;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
@ -300,7 +300,7 @@ QPushButton:disabled {
|
||||
QPushButton:checked:disabled {
|
||||
|
||||
/*color: #000a12;*/
|
||||
/*background-color: #c4001d;*/
|
||||
/*background-color: #00b686;*/
|
||||
|
||||
color: #263238;
|
||||
background-color: #4f5b62;
|
||||
@ -310,7 +310,7 @@ QPushButton:checked:disabled {
|
||||
|
||||
|
||||
QTabWidget::pane {
|
||||
/*border-top: 1px solid #ff1744;*/
|
||||
/*border-top: 1px solid #1de9b6;*/
|
||||
/*border: 10px solid #000a12;*/
|
||||
}
|
||||
|
||||
@ -387,8 +387,8 @@ QTabBar::tab:right{
|
||||
QTabBar::tab:top:selected,
|
||||
QTabBar::tab:top:hover {
|
||||
|
||||
color: #ff1744;
|
||||
border-bottom: 2px solid #ff1744;
|
||||
color: #1de9b6;
|
||||
border-bottom: 2px solid #1de9b6;
|
||||
|
||||
|
||||
/*padding-right: 5px;*/
|
||||
@ -398,8 +398,8 @@ QTabBar::tab:top:hover {
|
||||
QTabBar::tab:bottom:selected,
|
||||
QTabBar::tab:bottom:hover {
|
||||
|
||||
color: #ff1744;
|
||||
border-top: 2px solid #ff1744;
|
||||
color: #1de9b6;
|
||||
border-top: 2px solid #1de9b6;
|
||||
/*padding: 10px 0;*/
|
||||
|
||||
}
|
||||
@ -409,8 +409,8 @@ QTabBar::tab:bottom:hover {
|
||||
QTabBar::tab:right:selected,
|
||||
QTabBar::tab:right:hover {
|
||||
|
||||
color: #ff1744;
|
||||
border-left: 2px solid #ff1744;
|
||||
color: #1de9b6;
|
||||
border-left: 2px solid #1de9b6;
|
||||
|
||||
}
|
||||
|
||||
@ -418,8 +418,8 @@ QTabBar::tab:right:hover {
|
||||
QTabBar::tab:left:selected,
|
||||
QTabBar::tab:left:hover {
|
||||
|
||||
color: #ff1744;
|
||||
border-right: 2px solid #ff1744;
|
||||
color: #1de9b6;
|
||||
border-right: 2px solid #1de9b6;
|
||||
|
||||
}
|
||||
|
||||
@ -470,7 +470,7 @@ QTabBar::close-button:hover {
|
||||
QGroupBox {
|
||||
|
||||
background-color: #263238;
|
||||
/*border: 1px solid #ff1744;*/
|
||||
/*border: 1px solid #1de9b6;*/
|
||||
border-radius: 4px;
|
||||
/*margin: 3px;*/
|
||||
padding: 15px;
|
||||
@ -487,14 +487,14 @@ QGroupBox {
|
||||
|
||||
|
||||
QGroupBox::title {
|
||||
/*color: #ff1744;*/
|
||||
/*color: #1de9b6;*/
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
subcontrol-origin: margin;
|
||||
subcontrol-position: top left;
|
||||
padding: 0 15px;
|
||||
margin-top: 10px;
|
||||
background-color: #000a12;
|
||||
/*border: 1px solid #ff1744;*/
|
||||
/*border: 1px solid #1de9b6;*/
|
||||
background-color: transparent;
|
||||
height: 20px;
|
||||
border-radius: 8px;
|
||||
@ -575,7 +575,7 @@ QDockWidget::title {
|
||||
/*text-transform: uppercase;*/
|
||||
/*border-top: 5px solid #000a12;*/
|
||||
text-align: left;
|
||||
background-color: #263238;
|
||||
background-color: rgba(38, 50, 56, 0.3);
|
||||
padding-left: 35px;
|
||||
padding: 3px;
|
||||
margin-top: 4px;
|
||||
@ -611,7 +611,7 @@ QMenu::item {
|
||||
|
||||
QMenu::item:selected { /* when user selects item using mouse or keyboard */
|
||||
color: #000a12;
|
||||
background-color: #ff1744;
|
||||
background-color: #1de9b6;
|
||||
/*border: 1px solid #263238;*/
|
||||
border-radius: 4px;
|
||||
}
|
||||
@ -620,7 +620,7 @@ QMenu::item:selected { /* when user selects item using mouse or keyboard */
|
||||
QMenuBar::item:disabled,
|
||||
QMenu::item:disabled { /* when user selects item using mouse or keyboard */
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
/*background-color: #ff1744;*/
|
||||
/*background-color: #1de9b6;*/
|
||||
}
|
||||
|
||||
|
||||
@ -712,7 +712,7 @@ QMenuBar::item {
|
||||
QMenuBar::item:selected,
|
||||
QMenuBar::item:pressed {
|
||||
color: #000a12;
|
||||
background-color: #ff1744;
|
||||
background-color: #1de9b6;
|
||||
|
||||
}
|
||||
|
||||
@ -727,7 +727,7 @@ QToolBox::tab {
|
||||
|
||||
|
||||
QProgressBar {
|
||||
/*border: 1px solid #c4001d;*/
|
||||
/*border: 1px solid #00b686;*/
|
||||
border-radius: 0;
|
||||
|
||||
background-color: #4f5b62;
|
||||
@ -736,7 +736,7 @@ QProgressBar {
|
||||
}
|
||||
|
||||
QProgressBar::chunk {
|
||||
background-color: #ff1744;
|
||||
background-color: #1de9b6;
|
||||
/*width: 20px;*/
|
||||
}
|
||||
|
||||
@ -767,7 +767,7 @@ QScrollBar::handle:vertical {
|
||||
|
||||
QScrollBar::handle:vertical:hover,
|
||||
QScrollBar::handle:horizontal:hover {
|
||||
background: #ff1744;
|
||||
background: #1de9b6;
|
||||
}
|
||||
|
||||
|
||||
@ -829,7 +829,7 @@ background: #263238;
|
||||
}
|
||||
|
||||
QSlider::sub-page {
|
||||
background: #ff1744;
|
||||
background: #1de9b6;
|
||||
}
|
||||
|
||||
|
||||
@ -855,11 +855,19 @@ border-color: red;
|
||||
}
|
||||
|
||||
|
||||
QMdiArea{
|
||||
|
||||
background-color:#263238;
|
||||
background:#263238;
|
||||
|
||||
}
|
||||
|
||||
QMdiSubWindow{
|
||||
|
||||
/*border-radius: 2px;*/
|
||||
/*border-color: #4f5b62;*/
|
||||
/*background: #263238;*/
|
||||
background: #263238;
|
||||
background-color: #263238;
|
||||
/*border: 1px solid #4f5b62;*/
|
||||
|
||||
}
|
||||
@ -943,7 +951,7 @@ QToolButton:pressed {
|
||||
QToolButton:checked {
|
||||
background: #4f5b62;
|
||||
border-left: 10px solid #4f5b62;
|
||||
border-right: 10px solid #ff1744;
|
||||
border-right: 10px solid #1de9b6;
|
||||
}
|
||||
|
||||
QAbstractScrollArea {
|
||||
@ -952,7 +960,7 @@ QAbstractScrollArea {
|
||||
|
||||
QLineEdit {
|
||||
/*padding-left: 5px;*/
|
||||
border: 1px solid #ff1744;
|
||||
border: 1px solid #1de9b6;
|
||||
border-radius: 2px;
|
||||
/*padding: 55px;*/
|
||||
/*margin: 50px;*/
|
||||
@ -1056,3 +1064,11 @@ QTableView > QHeaderView::section:last {
|
||||
QTableView {
|
||||
alternate-background-color: rgba(38, 50, 56, 0.7);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*QGroupBox {*/
|
||||
|
||||
/*background-color: rgba(38, 50, 56, 0.5);*/
|
||||
|
||||
/*}*/
|
Loading…
x
Reference in New Issue
Block a user