aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libLumina/themes/None.qss.template2
-rw-r--r--lumina-desktop/LSession.cpp2
-rw-r--r--lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp18
-rw-r--r--lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h5
-rw-r--r--lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp16
5 files changed, 33 insertions, 10 deletions
diff --git a/libLumina/themes/None.qss.template b/libLumina/themes/None.qss.template
index a0fd490b..7d923b1e 100644
--- a/libLumina/themes/None.qss.template
+++ b/libLumina/themes/None.qss.template
@@ -29,7 +29,7 @@ LDPlugin#applauncher QToolButton{
background: transparent;
border: none;
border-radius: 5px;
- color: black;
+ color: white;
}
LDPlugin#applauncher QToolButton:hover{
background: %%PRIMARYDISABLECOLOR%%;
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp
index 9fd30b7d..aa3fa923 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -164,7 +164,7 @@ void LSession::setupSession(){
QApplication::processEvents();
launchStartupApps();
//QTimer::singleShot(500, this, SLOT(launchStartupApps()) );
- QApplication::processEvents();
+ //QApplication::processEvents();
splash.close();
}
diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
index e229774d..bfb985d1 100644
--- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
@@ -6,6 +6,7 @@
#include <QDir>
#include <QFileDialog>
#include <QInputDialog>
+#include <QtConcurrent>
NotePadPlugin::NotePadPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){
//qDebug() << "Creating Notepad Plugin:";
@@ -64,8 +65,8 @@ NotePadPlugin::NotePadPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID)
//qDebug() << "Connect Signals/slots";
//Setup the button connections
- connect(open, SIGNAL(clicked()), this, SLOT(openNote()) );
- connect(add, SIGNAL(clicked()), this, SLOT(newNote()) );
+ connect(open, SIGNAL(clicked()), this, SLOT(openNoteClicked()) );
+ connect(add, SIGNAL(clicked()), this, SLOT(newNoteClicked()) );
connect(rem, SIGNAL(clicked()), this, SLOT(remNote()) );
connect(edit, SIGNAL(textChanged()), this, SLOT(newTextAvailable()) );
connect(cnote, SIGNAL(currentIndexChanged(QString)), this, SLOT(noteChanged()) );
@@ -134,9 +135,12 @@ void NotePadPlugin::newNote(){
dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) );
dlg.show();
while( dlg.isVisible() ){
+ //this->thread()->usleep(300000); //300 ms between updates
QApplication::processEvents();
}
QString name = dlg.textValue();
+ //make sure to remove any "bad" characters from the name
+ name.remove("\""); name.remove(";"); name.remove("\'"); name.replace("/","_");
if(name.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled
QString fullpath = QDir::homePath()+"/Notes/"+name;
if(!fullpath.endsWith(".note")){ fullpath.append(".note"); }
@@ -156,6 +160,16 @@ void NotePadPlugin::newNote(){
}
}
+void NotePadPlugin::openNoteClicked(){
+ //QtConcurrent::run(this, &NotePadPlugin::openNote);
+ openNote();
+}
+
+void NotePadPlugin::newNoteClicked(){
+ //QtConcurrent::run(this, &NotePadPlugin::newNote);
+ newNote();
+}
+
void NotePadPlugin::remNote(){
QString note = cnote->currentData().toString();
if(note.isEmpty()){ return; }
diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h
index 5a9ea2be..84935a11 100644
--- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h
+++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h
@@ -36,9 +36,12 @@ private:
bool updating;
QTimer *typeTimer;
-private slots:
void openNote();
void newNote();
+
+private slots:
+ void openNoteClicked();
+ void newNoteClicked();
void remNote();
void newTextAvailable();
void updateContents();
diff --git a/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp b/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
index 8754e534..8c0fae09 100644
--- a/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
+++ b/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
@@ -21,8 +21,9 @@ ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool gob
if(ok && LXDG::checkValidity(item) ){
icon->setPixmap( LXDG::findIcon(item.icon, "preferences-system-windows-actions").pixmap(32,32) );
iconPath = item.icon;
- name->setText( item.name);
text = item.name;
+ if(!item.comment.isEmpty()){ text.append("<br><i> -- "+item.comment+"</i>"); }
+ name->setText(text);
setupActions(item);
}else{
gooditem = false;
@@ -102,9 +103,10 @@ ItemWidget::ItemWidget(QWidget *parent, XDGDesktop item) : QFrame(parent){
}
//Now fill it appropriately
icon->setPixmap( LXDG::findIcon(item.icon,"preferences-system-windows-actions").pixmap(64,64) );
- name->setText( item.name);
- text = item.name;
- this->setWhatsThis(name->text());
+ text = item.name;
+ if(!item.comment.isEmpty()){ text.append("<br><i> -- "+item.comment+"</i>"); }
+ name->setText(text);
+ this->setWhatsThis(item.name);
icon->setWhatsThis(item.filePath);
iconPath = item.icon;
//Now setup the buttons appropriately
@@ -132,6 +134,8 @@ void ItemWidget::createWidget(){
icon = new QLabel(this);
name = new QLabel(this);
name->setWordWrap(true);
+ name->setTextFormat(Qt::RichText);
+ name->setTextInteractionFlags(Qt::NoTextInteraction);
//Add them to the layout
this->setLayout(new QHBoxLayout());
this->layout()->setContentsMargins(1,1,1,1);
@@ -186,7 +190,9 @@ void ItemWidget::updateItems(){
int H = 2.3*name->fontMetrics().height(); //make sure the height is large enough for two lines
icon->setFixedSize(QSize(H-4, H-4));
actButton->setFixedSize( QSize( (H-4)/2, H-4) );
- name->setText( name->fontMetrics().elidedText(text, Qt::ElideRight, name->width()) );
+ QStringList newname = text.split("<br>");
+ for(int i=0; i<newname.length(); i++){ newname[i] = name->fontMetrics().elidedText(newname[i], Qt::ElideRight, name->width()); }
+ name->setText( newname.join("<br>") );
//Now reload the icon if necessary
if(icon->pixmap()->size().height() < (H-4) ){
if(iconPath.isEmpty()){
bgstack15