From ee0e88e4f8ecf5d3591e7a96d8af9f73380805d9 Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Fri, 29 Apr 2016 11:24:47 +0200 Subject: Tinted some Icons to differentiate between selected and non-selected students. --- src/server/connectionframe/connectionframe.cpp | 4 ++-- src/server/mainwindow/mainwindow.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src/server') diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp index 82e949a..d979798 100644 --- a/src/server/connectionframe/connectionframe.cpp +++ b/src/server/connectionframe/connectionframe.cpp @@ -30,11 +30,11 @@ static QString style_tutor( ); static QString style_selectedStudent( "QLabel{ background-color: #FFF; border-radius: 2px; color: black; } \ - QGroupBox { background-color: #AAA; margin: 0px; border-radius: 4px; border: 2px solid #6C8CD5;}" + QGroupBox { background-color: #ccebff; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}" ); static QString style_selectedTutor( "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \ - QGroupBox { background-color: #70C670; margin: 0px; border-radius: 4px; border: 2px solid #6C8CD5;}" + QGroupBox { background-color: #99ff99; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}" ); static QString style_disconnected( "QLabel{ background-color: #919191; color: black; } \ diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 3becb23..48e9b18 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -579,6 +579,17 @@ void MainWindow::unlockContextButtons() { for (auto it = _contextButtons.begin(); it != _contextButtons.end(); ++it) { (*it)->setEnabled(true); } + /* and disable some again based on special rules */ + if (getSelectedFrame()->client() != NULL) { + ui->action_DeleteClient->setEnabled(false); + } + if (getSelectedFrame()->client() == NULL) { + ui->action_SetAsTutor->setEnabled(false); + ui->action_StudentToTutorExclusive->setEnabled(false); + ui->action_StudentToTutor->setEnabled(false); + } + + } /***************************************************************************//** * Handle Mouse Release Event. -- cgit v1.2.3-55-g7522