|
2 | 2 | Orange Canvas Configuration
|
3 | 3 |
|
4 | 4 | """
|
| 5 | +import random |
5 | 6 | import uuid
|
6 | 7 | import warnings
|
7 | 8 |
|
@@ -98,39 +99,37 @@ def application_icon():
|
98 | 99 | Return the main application icon.
|
99 | 100 | """
|
100 | 101 | path = pkg_resources.resource_filename(
|
101 |
| - __name__, "icons/orange-canvas.svg" |
| 102 | + __name__, "icons/orange-256.png" |
102 | 103 | )
|
103 | 104 | return QIcon(path)
|
104 | 105 |
|
105 | 106 | @staticmethod
|
106 | 107 | def splash_screen():
|
| 108 | + splash_n = random.randint(1, 3) |
107 | 109 | path = pkg_resources.resource_filename(
|
108 |
| - __name__, "icons/orange-splash-screen.png") |
| 110 | + __name__, f"icons/orange-splash-screen-{splash_n:02}.png") |
109 | 111 | pm = QPixmap(path)
|
110 | 112 |
|
111 | 113 | version = Config.ApplicationVersion
|
112 | 114 | if version:
|
113 | 115 | version_parsed = LooseVersion(version)
|
114 | 116 | version_comp = version_parsed.version
|
115 | 117 | version = ".".join(map(str, version_comp[:2]))
|
116 |
| - size = 21 if len(version) < 5 else 16 |
| 118 | + size = 13 |
117 | 119 | font = QFont("Helvetica")
|
118 | 120 | font.setPixelSize(size)
|
119 |
| - font.setBold(True) |
120 |
| - font.setItalic(True) |
121 |
| - font.setLetterSpacing(QFont.AbsoluteSpacing, 2) |
122 | 121 | 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)) |
125 | 124 |
|
126 | 125 | p = QPainter(pm)
|
127 | 126 | p.setRenderHint(QPainter.Antialiasing)
|
128 | 127 | p.setRenderHint(QPainter.TextAntialiasing)
|
129 | 128 | 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) |
132 | 131 | p.end()
|
133 |
| - return pm, QRect(88, 193, 200, 20) |
| 132 | + return pm, QRect(23, 24, 200, 20) |
134 | 133 |
|
135 | 134 | @staticmethod
|
136 | 135 | def widgets_entry_points():
|
|
0 commit comments