Change default image dir; use qgroupbox
This commit is contained in:
parent
92a4c318a3
commit
e0eac1d22b
|
@ -2,8 +2,6 @@
|
|||
|
||||
## What you can do
|
||||
|
||||
To Contribute first fork the repository
|
||||
|
||||
### Add translations
|
||||
|
||||
1. Execute ```pylupdate5 $(find -name "*.py") -ts Rare/languages/{your lang (two letters)}.ts``` in project directrory
|
||||
|
@ -21,4 +19,7 @@ exmples:
|
|||
Select one Card of the project and implement it or make other changes
|
||||
|
||||
|
||||
If you made your changes, create a pull request
|
||||
##Git crash-course
|
||||
To contribute fork the repository and clone **your** repo. Then make your changes, add it to git with `git add .` and upload it to Github with `git commit -m "message"` and `git push` or with your IDE.
|
||||
|
||||
If you uploaded your changes, create a pull request
|
||||
|
|
|
@ -60,6 +60,8 @@ There are more options to contribute.
|
|||
- If you are a designer, you can add Stylesheets or create a logo or a banner
|
||||
- You can translate the application
|
||||
|
||||
**Note:** Pull Requests please to "dev" branch
|
||||
|
||||
More Information is in CONTRIBUTING.md
|
||||
|
||||
## Images
|
||||
|
|
|
@ -10,14 +10,15 @@ from custom_legendary.core import LegendaryCore
|
|||
logger = getLogger("LegendarySettings")
|
||||
|
||||
|
||||
class LegendarySettings(QWidget):
|
||||
class LegendarySettings(QGroupBox):
|
||||
def __init__(self, core: LegendaryCore):
|
||||
super(LegendarySettings, self).__init__()
|
||||
self.setTitle(self.tr("Legendary settings"))
|
||||
self.layout = QVBoxLayout()
|
||||
self.core = core
|
||||
self.title = QLabel("<h2>" + self.tr("Legendary settings") + "</h2>")
|
||||
self.layout.addWidget(self.title)
|
||||
|
||||
#self.title = QLabel("<h2>" + self.tr("Legendary settings") + "</h2>")
|
||||
#self.layout.addWidget(self.title)
|
||||
self.setObjectName("group")
|
||||
# Default installation directory
|
||||
self.select_path = PathEdit(core.get_default_install_dir(), type_of_file=QFileDialog.DirectoryOnly,
|
||||
infotext="Default")
|
||||
|
|
|
@ -3,7 +3,7 @@ import shutil
|
|||
from logging import getLogger
|
||||
|
||||
from PyQt5.QtCore import QSettings
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QFileDialog, QComboBox, QPushButton, QCheckBox
|
||||
from PyQt5.QtWidgets import QVBoxLayout, QFileDialog, QComboBox, QPushButton, QCheckBox, QGroupBox
|
||||
|
||||
from Rare.Components.Tabs.Settings.SettingsWidget import SettingsWidget
|
||||
from Rare.utils.QtExtensions import PathEdit
|
||||
|
@ -12,18 +12,18 @@ from Rare.utils.utils import get_lang, get_possible_langs
|
|||
logger = getLogger("RareSettings")
|
||||
|
||||
|
||||
class RareSettings(QWidget):
|
||||
class RareSettings(QGroupBox):
|
||||
def __init__(self):
|
||||
super(RareSettings, self).__init__()
|
||||
self.setTitle(self.tr("Rare settings"))
|
||||
self.setObjectName("group")
|
||||
self.layout = QVBoxLayout()
|
||||
self.title = QLabel("<h2>" + self.tr("Rare settings") + "</h2>")
|
||||
self.layout.addWidget(self.title)
|
||||
settings = QSettings()
|
||||
img_dir = settings.value("img_dir", type=str)
|
||||
language = settings.value("language", type=str)
|
||||
# default settings
|
||||
if not img_dir:
|
||||
settings.setValue("img_dir", os.path.expanduser("~/.cache/rare/"))
|
||||
settings.setValue("img_dir", os.path.expanduser("~/.cache/rare/images/"))
|
||||
if not language:
|
||||
settings.setValue("language", get_lang())
|
||||
del settings
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
|
||||
__version__ = "0.9.8"
|
||||
__version__ = "0.9.9"
|
||||
style_path = os.path.join(os.path.dirname(__file__), "Styles/")
|
||||
lang_path = os.path.join(os.path.dirname(__file__), "languages/")
|
||||
|
|
|
@ -11,8 +11,8 @@ from Rare import lang_path, __version__
|
|||
from custom_legendary.core import LegendaryCore
|
||||
|
||||
logger = getLogger("Utils")
|
||||
s = QSettings()
|
||||
IMAGE_DIR = s.value("img_dir", os.path.expanduser("~/.cache/rare"), type=str)
|
||||
s = QSettings("Rare", "Rare")
|
||||
IMAGE_DIR = s.value("img_dir", os.path.expanduser("~/.cache/rare/images/"), type=str)
|
||||
logger.info("IMAGE DIRECTORY: " + IMAGE_DIR)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue