# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['qtvscodestyle',
 'qtvscodestyle.examples',
 'qtvscodestyle.examples.activitybar',
 'qtvscodestyle.examples.icon_browser',
 'qtvscodestyle.examples.line',
 'qtvscodestyle.examples.lineedit',
 'qtvscodestyle.examples.pushbutton',
 'qtvscodestyle.examples.switching_theme',
 'qtvscodestyle.examples.theme_icon',
 'qtvscodestyle.examples.widget_gallery',
 'qtvscodestyle.examples.widget_gallery.ui',
 'qtvscodestyle.fonts',
 'qtvscodestyle.q_icon',
 'qtvscodestyle.qtpy',
 'qtvscodestyle.qtpy.QtCore',
 'qtvscodestyle.qtpy.QtGui',
 'qtvscodestyle.qtpy.QtSvg',
 'qtvscodestyle.qtpy.QtWidgets',
 'qtvscodestyle.resource_builder',
 'qtvscodestyle.stylesheet',
 'qtvscodestyle.stylesheet.icons',
 'qtvscodestyle.vscode',
 'qtvscodestyle.vscode.icons',
 'qtvscodestyle.vscode.theme']

package_data = \
{'': ['*']}

setup_kwargs = {
    'name': 'qtvscodestyle',
    'version': '0.1.0',
    'description': 'VS Code Style for PySide, PyQt.',
    'long_description': 'QtVSCodeStyle\n=============\n[![Qt Versions](https://img.shields.io/badge/Qt-5%20|%206-blue.svg?&logo=Qt&logoWidth=18&logoColor=white)](https://www.qt.io/qt-for-python)\n[![License](https://img.shields.io/github/license/5yutan5/QtVSCodeStyle.svg?color=green)](https://github.com/5yutan5/QtVSCodeStyle/blob/main/LICENSE.txt/)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/5yutan5/QtVSCodeStyle.svg?logo=lgtm&logoWidth=18&color=success)](https://lgtm.com/projects/g/5yutan5/QtVSCodeStyle/alerts/)\n[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/5yutan5/QtVSCodeStyle.svg?logo=lgtm&logoWidth=18&color=success)](https://lgtm.com/projects/g/5yutan5/QtVSCodeStyle/context:python)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/python/black)\n\nVS Code Style for PySide and PyQt.\n\nQtVSCodeStyle enables to use VS Code themes in pyqt and pyside.\nThe default and extension themes of VS Code can be used.\n\n\n## SCREENSHOT\n|[Dark (Visual Studio)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_dark.png)|[Light (Visual Studio)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_light.png)|[Dark High Contrast](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_hc.png)|\n| :--: | :--: | :--: |\n|[![widget_gallery_dark_theme](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_dark.png)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_dark.png)|[![widget_gallery_light_them](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_light.png)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_light.png)|[![widget_gallery_light_them](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_hc.png)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_hc.png)|\n|[Night Owl](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_night_owl.png)|[One Dark Pro](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_one_dark_pro.png)|[Ayu Light](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_ayu_light.png)|\n|[![Night Owl](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_night_owl.png)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_night_owl.png)|[![widget_gallery_one_dark_pro_theme](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_one_dark_pro.png)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_one_dark_pro.png)|[![widget_gallery_ayu_light_them](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_ayu_light.png)](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/widget_gallery_ayu_light.png)\n\netc...\n\n\n## Requirements\n\n- [Python 3.7+](https://www.python.org/downloads/)\n- PySide6, PyQt6, PyQt5 or PySide2\n\nNot tested on linux.\n\n## Installation Method\n\n- Last released version\n   ```plaintext\n   pip install qtvscodestyle\n   ```\n- Latest development version\n   ```plaintext\n   pip install git+https://github.com/5yutan5/QtVSCodeStyle\n   ```\n\n## Usage\n\n### Use default theme\n\nTo apply VS Code\'s default theme, run:\n\n```Python\nimport sys\n\nfrom PySide6.QtWidgets import QApplication, QMainWindow, QPushButton\n\nimport qtvscodestyle as qtvsc\n\napp = QApplication(sys.argv)\nmain_win = QMainWindow()\npush_button = QPushButton("QtVSCodeStyle!!")\nmain_win.setCentralWidget(push_button)\n\nstylesheet = qtvsc.load_stylesheet(qtvsc.Theme.DARK_VS)\n# stylesheet = load_stylesheet(qtvsc.Theme.LIGHT_VS)\napp.setStyleSheet(stylesheet)\n\nmain_win.show()\n\napp.exec()\n\n```\n\n> ⚠ The image quality may be lower on Qt5(PyQt5, PySide2) due to the use of svg. You can add the following [attribute](https://doc.qt.io/qt-5/qt.html#ApplicationAttribute-enum) to improve the quality of images.\n> ```Python\n> app.setAttribute(Qt.ApplicationAttribute.AA_UseHighDpiPixmaps)\n> ```\n\n#### Available Themes\n\nTo check available themes, run:\n\n```Python\nqtvsc.list_themes()\n```\n\n```plaintext\nTheme name             Symbol\n___________            ______\n\nLight (Visual Studio): LIGHT_VS\nQuiet Light          : QUIET_LIGHT\nSolarized Light      : SOLARIZED_LIGHT\nAbyss                : ABYSS\nDark (Visual Studio) : DARK_VS\nKimbie Dark          : KIMBIE_DARK\nMonokai              : MONOKAI\nMonokai Dimmed       : MONOKAI_DIMMED\nRed                  : RED\nSolarized Dark       : SOLARIZED_DARK\nTomorrow Night Blue  : TOMORROW_NIGHT_BLUE\nDark High Contrast   : DARK_HIGH_CONTRAST\n```\n\n### Use extension themes\n\nIf you want to use a third party theme, you will need to download the theme file from the repository and load theme by using `load_stylesheet()`.  \n\nSimple example of using One Dark Pro.  \nOne Dark Pro is one of the most used themes for VS Code.\n1. First of all, download or copy and paste [the theme file from the repository](https://github.com/Binaryify/OneDark-Pro/blob/master/themes/OneDark-Pro.json).  \n1. Then load the stylesheet using the saved file.\n   ```Python\n   theme_file = r"OneDark-Pro.json"\n   stylesheet = qtvsc.load_stylesheet(theme_file)\n   app.setStyleSheet(stylesheet)\n   ```\n\n### Color customization\n\nThe configuration method is the same as [workbench.colorCustomizations](https://code.visualstudio.com/api/extension-guides/color-theme#workbench-colors) of VSCode.  \nAbout color code format, see [https://code.visualstudio.com/api/references/theme-color#color-formats](https://code.visualstudio.com/api/references/theme-color#color-formats).\n\n```Python\n# Set the button text color to red.\ncustom_colors = {"button.foreground": "#ff0000"}\nstylesheet = qtvsc.load_stylesheet(qtvsc.Theme.DARK_VS, custom_colors)\n```\n\nTo check available themes, run:\n\n```Python\nqtvsc.list_color_id()\n```\n\nSame as [VS Code\'s theme color document](https://code.visualstudio.com/api/references/theme-color).\n\n### SVG and Font QIcon for VS Code style\n\nYou can also use various icon fonts and svg as QIcon.\n\n[![VS Code style icon](https://raw.githubusercontent.com/5yutan5/QtVSCodeStyle/main/images/qicon_for_vscode_style.gif)](https://github.com/5yutan5/QtVSCodeStyle/blob/main/images/qicon_for_vscode_style.gif)\n\nQtVSCodeStyle identifies icons by symbolic and  icon name.\nThe following symbolic are currently available to use:\n\n- [Font Awesome Free(5.15.4)](https://fontawesome.com/) - Font Icon\n   - `FaRegular`: Regular style\n   - `FaSolid` : Solid style\n   - `FaBrands`: Brands style\n- [vscode-codicons](https://github.com/microsoft/vscode-codicons)\n   - `Vsc`: VS Code style - SVG Icon\n\nYou can use icon browser that displays all the available icons.\n\n```Plaintext\npython -m qtvscodestyle.examples.icon_browser\n```\n\nTwo functions, `theme_icon()` and `icon()` are available.\n`theme_icon()` create QIcon will automatically switch the color based on the set color-id when you call `load_stylesheet(Another Theme)`.\n\n```Python\nstar_icon = qtvsc.theme_icon(qtvsc.Vsc.STAR_FULL, "icon.foreground")\nbutton = QToolButton()\nbutton.setIcon(star_icon)\n\n# star_icon switch to the MONOKAI\'s "icon.foreground" color.\nqtvsc.load_stylesheet(qtvsc.Theme.MONOKAI)\n```\n\n\n`icon()` create QIcon with static color.\n```Python\n# Set red\nstar_icon = qtvsc.icon(qtvsc.Vsc.STAR_FULL, "#FF0000")\nbutton = QToolButton()\nbutton.setIcon(star_icon)\n\n# Keep red.\nqtvsc.load_stylesheet(qtvsc.Theme.MONOKAI)\n```\n\n\n### Create new theme\n\nYou can create your own theme. The configuration method is the same as theme extension of VS Code.\nThe only properties to set are the theme type and colors.\n\nDictionary, json file(json with comment), and string formats are supported.\n\n- Dictionary\n   ```Python\n   custom_theme = {\n       "type": "dark",  # dark or light or hc(high contrast)\n       "colors": {\n           "button.background": "#1e1e1e",\n           "foreground": "#d4d4d4",\n           "selection.background": "#404040",\n       },\n   }\n   stylesheet = qtvsc.load_stylesheet(custom_theme)\n   ```\n- String(Json with comment text)\n   ```Python\n   custom_theme = """\n   {\n      "type": "dark",\n      "colors": {\n         "button.background": "#1e1e1e",\n         "foreground": "#d4d4d4",\n         "selection.background": "#404040"\n      }\n   }\n   """\n   # You need to use loads_stylesheet\n   stylesheet = qtvsc.loads_stylesheet(custom_theme)\n   ```\n- Json with comment\n   ```Python\n   custom_theme_path = r"custom_theme.json"\n   # or you can use pathlib.Path object\n   # custom_theme_path = pathlib.Path("custom_theme.json")\n   stylesheet = qtvsc.load_stylesheet(custom_theme_path)\n   ```\n\nIf you customize using json files, you can use json schema.\nCopy json schema from `qvscodestyle/validate_colors.json`\nUsing schema example for VS Code: https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings\n\n## Check common widgets\n\nTo check common widgets, run:\n\n```plaintext\npython -m qtvscodestyle.examples.widget_gallery\n```\n\n## Custom properties\n\nThis module provides several custom properties for applying VS Code\'s style.  \n\nFor example, if you set the `activitybar` to `type` custom property of QToolbar, the style of the activitybar will be applied.\n\n```Python\nactivitybar = QToolBar()\nactivitybar.setProperty("type", "activitybar")\n```\n\n| Widget      | Property | Property value | Command for demo                              |\n|-------------|----------|----------------|-----------------------------------------------|\n| QToolBar    | type     | activitybar    | `python -m qtvscodestyle.examples.activitybar` |\n| QPushButton | type     | secondary      | `python -m qtvscodestyle.examples.pushbutton`  |\n| QLineEdit   | state    | warning, error | `python -m qtvscodestyle.examples.lineedit`    |\n| QFrame      | type     | h_line, v_line | `python -m qtvscodestyle.examples.line`        |\n\n## Build resources\n\nQtVSCodeStyle creates and deletes icon files dynamically using temporary folder.  \nThe style sheet you created will no longer be available after you exit the program.  \nTherefore, QtVSCodeStyle provides the tool to build style sheets with resources that can be used after you exit the program.  \n\nIn order to build style sheets, run:\n```plaintext\npython -m qtvscodestyle.resource_builder --theme dark_vs\n```\n\nIt is also possible to apply custom colors.\n\n```plaintext\npython -m qtvscodestyle.resource_builder -t dark_vs --custom-colors-path custom.json\n```\n\n```json\n// custom.json\n{\n   "focusBorder": "#ff0000",\n   "foreground": "#ff00ff"\n}\n```\n\nIn order check details of the command, run:\n\n```plaintext\npython -m qtvscodestyle.resource_builder --help\n```\n> ⚠ Resource files and svg folders should always be in the same directory.\n\n> ⚠ Not support on PyQt6. PyQt6 removed Qt’s resource system.\n\n## How to use in Qt Designer\n\n1. Run the `qtvscodestyle.resource_builder` command and generate resources.\n1. Copy the stylesheet text from `stylesheet.qss`.\n1. Paste the copied stylesheet into stylesheet property of the top-level widget.\n1. Register the `resource.qrc` in generated folder to the resource browser. If you use Qt Creator, add `resource.qrc` and svg folder to your project.\n\n\n## License\n\nMIT, see [LICENSE.txt](https://github.com/5yutan5/QtVSCodeStyle/blob/main/LICENSE.txt).\nQtVSCodeStyle incorporates image assets from external sources.\nThe icons for the QtVSCodeStyle are derived from:\n\n- Font Awesome Free 5.15.4 (Font Awesome; SIL OFL 1.1)\n- Material design icons (Google; Apache License Version 2.0)\n- vscode-codicons (Microsoft Corporation; CC-BY-SA-4.0 License)\n\nSee [NOTICE.md](https://github.com/5yutan5/QtVSCodeStyle/blob/main/NOTICE.md) for full license information.\n\n## Acknowledgements\n\nThis package has been created with reference to the following repositories.\n\n- [QDarkStyleSheet](https://github.com/ColinDuquesnoy/QDarkStyleSheet)\n- [BreezeStyleSheets](https://github.com/Alexhuszagh/BreezeStyleSheets)\n- [qt-material](https://github.com/UN-GCPDS/qt-material)\n- [vscode](https://github.com/microsoft/vscode)\n- [QtAwesome](https://github.com/spyder-ide/qtawesome)\n- [Napari](https://github.com/napari/napari)\n',
    'author': 'Yunosuke Ohsugi',
    'author_email': '63651161+5yutan5@users.noreply.github.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/5yutan5/QtVSCodeStyle',
    'packages': packages,
    'package_data': package_data,
    'python_requires': '>=3.7,<4.0',
}


setup(**setup_kwargs)
