[X2Go-Commits] [x2goclient] 01/01: Fixing setting widget style issue in InteractionDialog on Windows client.
git-admin at x2go.org
git-admin at x2go.org
Thu May 11 12:02:40 CEST 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 6b5dfa017a5cb9d86c654c57641c2213c6557b51
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Thu May 11 12:01:42 2017 +0200
Fixing setting widget style issue in InteractionDialog on Windows client.
---
debian/changelog | 3 ++-
src/InteractionDialog.cpp | 34 ++++++++++++++++++++++++++++------
2 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a70d5e0..7991fa1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -158,7 +158,8 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium
Set for direct XDMCP session username=XDM.
- Interaction with SSH server (for example for changing
expired password). Fixes: #592.
-
+ - Fixing setting widget style issue in InteractionDialog on
+ Windows client.
[ Robert Parts ]
* New upstream version (4.1.0.1):
- res/i18n/x2goclient_et.ts: update Estonian translation file.
diff --git a/src/InteractionDialog.cpp b/src/InteractionDialog.cpp
index eac7a23..8f5bb2f 100644
--- a/src/InteractionDialog.cpp
+++ b/src/InteractionDialog.cpp
@@ -23,12 +23,18 @@
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
+#include <QScrollBar>
+
+#ifndef Q_OS_LINUX
+#if QT_VERSION < 0x050000
+#include <QPlastiqueStyle>
+#endif
+#endif
InteractionDialog::InteractionDialog(QWidget* parent): SVGFrame(":/img/svg/passform.svg",
false,parent )
{
mw=(ONMainWindow*)parent;
- mw->setWidgetStyle(this);
if ( !mw->retMiniMode() )
setFixedSize ( this->sizeHint().width(),this->sizeHint().height()*1.5 );
@@ -69,17 +75,30 @@ InteractionDialog::InteractionDialog(QWidget* parent): SVGFrame(":/img/svg/passf
textEntry=new QLineEdit(this);
textEntry->setEchoMode(QLineEdit::NoEcho);
lay->addWidget(textEntry);
- mw->setWidgetStyle(textEntry);
cancelButton=new QPushButton(tr("Cancel"),this);
lay->addWidget(cancelButton);
- mw->setWidgetStyle(textEdit);
textEdit->setReadOnly(true);
- mw->setWidgetStyle(textEdit->viewport());
- mw->setWidgetStyle((QWidget*)textEdit->verticalScrollBar());
- mw->setWidgetStyle(cancelButton);
connect(textEntry,SIGNAL(returnPressed()),this,SLOT(slotTextEntered()));
connect(cancelButton, SIGNAL(clicked(bool)),this,SLOT(slotButtonPressed()));
+ textEdit->setFrameStyle ( QFrame::StyledPanel|QFrame::Plain );
+ cancelButton->setFlat(true);
+
+#ifndef Q_OS_LINUX
+ QStyle* widgetExtraStyle;
+#if QT_VERSION < 0x050000
+ widgetExtraStyle = new QPlastiqueStyle ();
+#else
+ widgetExtraStyle = QStyleFactory::create ("fusion");
+#endif
+
+ this->setStyle(widgetExtraStyle);
+ textEntry->setStyle(widgetExtraStyle);
+ textEdit->setStyle(widgetExtraStyle);
+ textEdit->viewport()->setStyle(widgetExtraStyle);
+ cancelButton->setStyle(widgetExtraStyle);
+
+#endif
}
InteractionDialog::~InteractionDialog()
@@ -95,6 +114,9 @@ void InteractionDialog::appendText(QString txt)
interrupted=false;
display=false;
cancelButton->setText(tr("Cancel"));
+#ifdef Q_OS_WIN
+ QTimer::singleShot(0, textEntry, SLOT(setFocus()));
+#endif
}
void InteractionDialog::reset()
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list