Cross platform image copy system, icons for tabs.
+ Fixing issue with unreadable text color in the about dialog.
This commit is contained in:
parent
9b03090d14
commit
db89cb680f
4 changed files with 19 additions and 10 deletions
|
@ -40,7 +40,7 @@ D.Dialog {
|
|||
anchors.topMargin: 10
|
||||
}
|
||||
|
||||
Text {
|
||||
Label {
|
||||
id: appName
|
||||
anchors.top: logo.bottom
|
||||
anchors.left: parent.left
|
||||
|
@ -52,7 +52,7 @@ D.Dialog {
|
|||
text: "Logarithmic Plotter v" + Helper.getVersion()
|
||||
}
|
||||
|
||||
Text {
|
||||
Label {
|
||||
id: description
|
||||
anchors.top: appName.bottom
|
||||
anchors.left: parent.left
|
||||
|
@ -64,7 +64,7 @@ D.Dialog {
|
|||
text: "Create graphs with logarithm scales."
|
||||
}
|
||||
|
||||
Text {
|
||||
Label {
|
||||
id: debugInfos
|
||||
anchors.top: description.bottom
|
||||
anchors.left: parent.left
|
||||
|
@ -76,7 +76,7 @@ D.Dialog {
|
|||
text: Helper.getDebugInfos()
|
||||
}
|
||||
|
||||
Text {
|
||||
Label {
|
||||
id: copyrightInfos
|
||||
anchors.top: debugInfos.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
@ -85,7 +85,7 @@ D.Dialog {
|
|||
wrapMode: Text.WordWrap
|
||||
textFormat: Text.RichText
|
||||
font.pixelSize: 13
|
||||
text: "Copyright (C) 2021 Ad5001 <mail@ad5001.eu><br>
|
||||
text: "Copyright © 2021 Ad5001 <mail@ad5001.eu><br>
|
||||
<br>
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br>
|
||||
<br>
|
||||
|
|
|
@ -57,12 +57,21 @@ ApplicationWindow {
|
|||
anchors.top: parent.top
|
||||
TabButton {
|
||||
text: qsTr("Objects")
|
||||
icon.name: 'polygon-add-nodes'
|
||||
icon.color: sysPalette.windowText
|
||||
//height: 24
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Settings")
|
||||
icon.name: 'preferences-system'
|
||||
icon.color: sysPalette.windowText
|
||||
//height: 24
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("History")
|
||||
icon.name: 'history'
|
||||
icon.color: sysPalette.windowText
|
||||
//height: 24
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ ListView {
|
|||
icon.name: modelData
|
||||
icon.width: 24
|
||||
icon.height: 24
|
||||
icon.color: sysPalette.windowText
|
||||
icon.color: 'white'//sysPalette.windowText
|
||||
|
||||
onClicked: {
|
||||
var newObj = Objects.createNewRegisteredObject(modelData)
|
||||
|
|
8
run.py
8
run.py
|
@ -19,7 +19,7 @@
|
|||
from PySide2.QtWidgets import QApplication, QFileDialog
|
||||
from PySide2.QtQml import QQmlApplicationEngine, qmlRegisterType
|
||||
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtGui import QIcon, QImage
|
||||
from PySide2 import __version__ as PySide2_version
|
||||
|
||||
import os
|
||||
|
@ -39,7 +39,7 @@ tempfile = tempfile.mkstemp(suffix='.png')[1]
|
|||
|
||||
def get_linux_theme():
|
||||
des = {
|
||||
"KDE": "fusion", # org.kde.desktop resolves to universal in PySide2.
|
||||
"KDE": "Flat",
|
||||
"gnome": "default",
|
||||
"lxqt": "fusion",
|
||||
"mate": "fusion",
|
||||
|
@ -82,8 +82,8 @@ class Helper(QObject):
|
|||
@Slot()
|
||||
def copyImageToClipboard(self):
|
||||
global tempfile
|
||||
# TODO: Better copy system
|
||||
os.system("xclip -selection clipboard -t image/png -i " + tempfile)
|
||||
clipboard = QApplication.clipboard()
|
||||
clipboard.setImage(QImage(tempfile))
|
||||
|
||||
@Slot(result=str)
|
||||
def getVersion(self):
|
||||
|
|
Loading…
Reference in a new issue