Skip to content

Commit

Permalink
Updated to current project and python solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ARS-CSGCL-DT committed Jan 23, 2024
1 parent 4c422ae commit 30c0ab7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
6 changes: 0 additions & 6 deletions Classim/CLASSIM.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
<SearchPath>helper</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath>
<Name>crop_int_new</Name>
<RootNamespace>crop_int</RootNamespace>
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
<PublishUrl>
</PublishUrl>
<SuppressEnvironmentCreationPrompt>True</SuppressEnvironmentCreationPrompt>
Expand Down
18 changes: 7 additions & 11 deletions Classim/Classim.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from PyQt5.QtWidgets import QApplication

'''
Starting point for the application. It calls tabs.py (to calls all the other tabs of Welcome, Site, Soil, Cultivar, Weather,
Starting point for the application. It calls tabs.py (to call all the other tabs of Welcome, Site, Soil, Cultivar, Weather,
Management, Run, Output).
DPI scaling is handled here. Important.
Note the comment for remote debugging. Important.
Expand All @@ -17,7 +17,8 @@
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)

if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
#QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)

os.environ["QT_SCALE_FACTOR"] ="1.25"

Expand All @@ -31,7 +32,7 @@ def except_hook(cls, exception, traceback):
QLabel, QTextEdit {
color: black;
}
}
QPushButton {
background-color: #97b498;
Expand Down Expand Up @@ -108,19 +109,14 @@ def except_hook(cls, exception, traceback):
app.setStyleSheet(style)
mQFont = app.font()

if mQFont.pixelSize() >0 :
mQFont.setPixelSize(11)
else:
mQFont.setPointSize(11)

mQFont.setPointSizeF(7)
mQFont.setPixelSize(7)
mQFont.setPointSizeF(11)
mQFont.setPixelSize(11)
app.setFont(mQFont)

import sys
sys.excepthook = except_hook

conn, c = openDB(dbDir + '\\crop.db')
conn, c = openDB('crop.db')
if c:
ManagementTab = Tabs_Widget()
sys.exit(app.exec_())

0 comments on commit 30c0ab7

Please sign in to comment.