-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display error message when running in non-Sway environment
- Loading branch information
1 parent
0ff5ab0
commit 22e4650
Showing
6 changed files
with
207 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>ErrorMessage</class> | ||
<widget class="QDialog" name="ErrorMessage"> | ||
<property name="windowModality"> | ||
<enum>Qt::WindowModal</enum> | ||
</property> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>670</width> | ||
<height>115</height> | ||
</rect> | ||
</property> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>670</width> | ||
<height>115</height> | ||
</size> | ||
</property> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>670</width> | ||
<height>115</height> | ||
</size> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Sway socket not found!</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<spacer name="verticalSpacer_2"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string><html><head/><body><p><span style=" font-size:10pt;">Sway Input Configurator only supports Sway. You are probably using an unsupported window manager or there are problems with your Sway configuration.</span></p></body></html></string> | ||
</property> | ||
<property name="textFormat"> | ||
<enum>Qt::AutoText</enum> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout_3"> | ||
<item> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Ok</set> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
################################################################################ | ||
## Form generated from reading UI file 'error_message.ui' | ||
## | ||
## Created by: Qt User Interface Compiler version 5.15.8 | ||
## | ||
## WARNING! All changes made in this file will be lost when recompiling UI file! | ||
################################################################################ | ||
|
||
from PySide2.QtCore import * # type: ignore | ||
from PySide2.QtGui import * # type: ignore | ||
from PySide2.QtWidgets import * # type: ignore | ||
|
||
|
||
class Ui_ErrorMessage(object): | ||
def setupUi(self, ErrorMessage): | ||
if not ErrorMessage.objectName(): | ||
ErrorMessage.setObjectName(u"ErrorMessage") | ||
ErrorMessage.setWindowModality(Qt.WindowModal) | ||
ErrorMessage.resize(670, 115) | ||
sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) | ||
sizePolicy.setHorizontalStretch(0) | ||
sizePolicy.setVerticalStretch(0) | ||
sizePolicy.setHeightForWidth(ErrorMessage.sizePolicy().hasHeightForWidth()) | ||
ErrorMessage.setSizePolicy(sizePolicy) | ||
ErrorMessage.setMinimumSize(QSize(670, 115)) | ||
ErrorMessage.setMaximumSize(QSize(670, 115)) | ||
self.verticalLayout = QVBoxLayout(ErrorMessage) | ||
self.verticalLayout.setObjectName(u"verticalLayout") | ||
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) | ||
|
||
self.verticalLayout.addItem(self.verticalSpacer_2) | ||
|
||
self.horizontalLayout = QHBoxLayout() | ||
self.horizontalLayout.setObjectName(u"horizontalLayout") | ||
self.label = QLabel(ErrorMessage) | ||
self.label.setObjectName(u"label") | ||
self.label.setTextFormat(Qt.AutoText) | ||
self.label.setWordWrap(True) | ||
|
||
self.horizontalLayout.addWidget(self.label) | ||
|
||
|
||
self.verticalLayout.addLayout(self.horizontalLayout) | ||
|
||
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) | ||
|
||
self.verticalLayout.addItem(self.verticalSpacer) | ||
|
||
self.horizontalLayout_3 = QHBoxLayout() | ||
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") | ||
self.buttonBox = QDialogButtonBox(ErrorMessage) | ||
self.buttonBox.setObjectName(u"buttonBox") | ||
self.buttonBox.setStandardButtons(QDialogButtonBox.Ok) | ||
|
||
self.horizontalLayout_3.addWidget(self.buttonBox) | ||
|
||
|
||
self.verticalLayout.addLayout(self.horizontalLayout_3) | ||
|
||
|
||
self.retranslateUi(ErrorMessage) | ||
|
||
QMetaObject.connectSlotsByName(ErrorMessage) | ||
# setupUi | ||
|
||
def retranslateUi(self, ErrorMessage): | ||
ErrorMessage.setWindowTitle(QCoreApplication.translate("ErrorMessage", u"Sway socket not found!", None)) | ||
self.label.setText(QCoreApplication.translate("ErrorMessage", u"<html><head/><body><p><span style=\" font-size:10pt;\">Sway Input Configurator only supports Sway. You are probably using an unsupported window manager or there are problems with your Sway configuration.</span></p></body></html>", None)) | ||
# retranslateUi | ||
|