Skip to content

Commit c38b96f

Browse files
authoredFeb 7, 2022
Merge pull request #5814 from markotoplak/new-cgp
[ENH] New icons and splash screen
2 parents d545b38 + d123b6f commit c38b96f

13 files changed

+11
-188
lines changed
 

‎Orange/canvas/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def onPaletteChange():
410410
app.paletteChanged.connect(onPaletteChange)
411411
onPaletteChange()
412412

413-
def show_splash_message(self, message: str, color=QColor("#FFD39F")):
413+
def show_splash_message(self, message: str, color=QColor("#FFFFFF")):
414414
super().show_splash_message(message, color)
415415

416416
def create_main_window(self):

‎Orange/canvas/config.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Orange Canvas Configuration
33
44
"""
5+
import random
56
import uuid
67
import warnings
78

@@ -98,39 +99,37 @@ def application_icon():
9899
Return the main application icon.
99100
"""
100101
path = pkg_resources.resource_filename(
101-
__name__, "icons/orange-canvas.svg"
102+
__name__, "icons/orange-256.png"
102103
)
103104
return QIcon(path)
104105

105106
@staticmethod
106107
def splash_screen():
108+
splash_n = random.randint(1, 3)
107109
path = pkg_resources.resource_filename(
108-
__name__, "icons/orange-splash-screen.png")
110+
__name__, f"icons/orange-splash-screen-{splash_n:02}.png")
109111
pm = QPixmap(path)
110112

111113
version = Config.ApplicationVersion
112114
if version:
113115
version_parsed = LooseVersion(version)
114116
version_comp = version_parsed.version
115117
version = ".".join(map(str, version_comp[:2]))
116-
size = 21 if len(version) < 5 else 16
118+
size = 13
117119
font = QFont("Helvetica")
118120
font.setPixelSize(size)
119-
font.setBold(True)
120-
font.setItalic(True)
121-
font.setLetterSpacing(QFont.AbsoluteSpacing, 2)
122121
metrics = QFontMetrics(font)
123-
br = metrics.boundingRect(version).adjusted(-5, 0, 5, 0)
124-
br.moveCenter(QPoint(436, 224))
122+
br = metrics.boundingRect(version)
123+
br.moveTopLeft(QPoint(171, 438))
125124

126125
p = QPainter(pm)
127126
p.setRenderHint(QPainter.Antialiasing)
128127
p.setRenderHint(QPainter.TextAntialiasing)
129128
p.setFont(font)
130-
p.setPen(QColor("#231F20"))
131-
p.drawText(br, Qt.AlignCenter, version)
129+
p.setPen(QColor("#000000"))
130+
p.drawText(br, Qt.AlignLeft, version)
132131
p.end()
133-
return pm, QRect(88, 193, 200, 20)
132+
return pm, QRect(23, 24, 200, 20)
134133

135134
@staticmethod
136135
def widgets_entry_points():

‎Orange/canvas/icons/orange-256.png

52.9 KB
Loading

‎Orange/canvas/icons/orange-canvas.svg

-88
This file was deleted.
Loading
Loading
Loading
-35.1 KB
Binary file not shown.

‎Orange/canvas/icons/orange.ico

-280 KB
Binary file not shown.

‎distribute/icon-256.png

17 KB
Loading

‎distribute/icon-48.png

-2.08 KB
Loading

‎distribute/orange-canvas.png

52.9 KB
Loading

‎distribute/orange-canvas.svg

-88
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.