diff options
-rw-r--r-- | src-qt5/core/lumina-desktop/BootSplash.cpp | 2 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp | 13 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/MainUI.cpp | 11 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/Browser.cpp | 12 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/Browser.h | 2 |
5 files changed, 24 insertions, 16 deletions
diff --git a/src-qt5/core/lumina-desktop/BootSplash.cpp b/src-qt5/core/lumina-desktop/BootSplash.cpp index 1a648973..d2850aee 100644 --- a/src-qt5/core/lumina-desktop/BootSplash.cpp +++ b/src-qt5/core/lumina-desktop/BootSplash.cpp @@ -7,6 +7,8 @@ BootSplash::BootSplash() : QWidget(0, Qt::SplashScreen | Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint | Qt::WindowDoesNotAcceptFocus), ui(new Ui::BootSplash){ ui->setupUi(this); + this->setMinimumHeight( this->fontMetrics().height() * 12); + this->setMinimumWidth( this->minimumHeight() * 1.5); this->setObjectName("LuminaBootSplash"); //for theme styling //Center the window on the primary screen QPoint ctr = QApplication::desktop()->screenGeometry().center(); diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp index bdc54212..f4382ffc 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp @@ -165,7 +165,7 @@ void ItemWidget::createWidget(){ actButton->setPopupMode(QToolButton::InstantPopup); actButton->setArrowType(Qt::DownArrow); icon = new QLabel(this); - int H = 64; //(2.3*this->fontMetrics().height() ) -4; //make sure the height is large enough for two lines + int H = (2.5*this->fontMetrics().height() ) -4; //make sure the height is large enough for two lines icon->setFixedSize( QSize(H,H) ); name = new QLabel(this); name->setWordWrap(true); @@ -230,7 +230,7 @@ void ItemWidget::setupActions(XDGDesktop *app){ void ItemWidget::updateItems(){ //update the text/icon to match sizes - int H = 64; //(2.3*name->fontMetrics().height() ) -4; //make sure the height is large enough for two lines + int H = (2.5*name->fontMetrics().height() ) -4; //make sure the height is large enough for two lines icon->setFixedSize(QSize(H, H)); actButton->setFixedSize( QSize( H/2, H) ); QStringList newname = text.split("<br>"); @@ -238,23 +238,20 @@ void ItemWidget::updateItems(){ name->setText( newname.join("<br>") ); //Now reload the icon if necessary if(icon->pixmap()!=0){ - if(icon->pixmap()->size().height() < (H-4) ){ + if(icon->pixmap()->size().height() < H ){ if(iconPath.isEmpty()){ //Use item path (thumbnail or mimetype) if(LUtils::imageExtensions().contains(icon->whatsThis().section("/",-1).section(".",-1).toLower()) ){ ICONS->loadIcon(icon, icon->whatsThis()); - //icon->setPixmap( QIcon(icon->whatsThis()).pixmap(H-4,H-4).scaledToHeight(H-4,Qt::SmoothTransformation) ); }else{ ICONS->loadIcon(icon, LXDG::findAppMimeForFile(icon->whatsThis()).replace("/","-") ); - //icon->setPixmap( LXDG::findMimeIcon(icon->whatsThis().section("/",-1)).pixmap(H-4,H-4).scaledToHeight(H-4,Qt::SmoothTransformation) ); } }else{ if(ICONS->exists(iconPath)){ ICONS->loadIcon(icon, iconPath); } else{ ICONS->loadIcon(icon, "preferences-system-windows-actions"); } - //icon->setPixmap( LXDG::findIcon(iconPath,"preferences-system-windows-actions").pixmap(H-4,H-4).scaledToHeight(H-4,Qt::SmoothTransformation) ); } - }else if(icon->pixmap()->size().height() > (H-4) ){ - icon->setPixmap( icon->pixmap()->scaled(H-4, H-4, Qt::IgnoreAspectRatio, Qt::SmoothTransformation) ); + }else if(icon->pixmap()->size().height() > H ){ + icon->setPixmap( icon->pixmap()->scaled(H, H, Qt::IgnoreAspectRatio, Qt::SmoothTransformation) ); } } } diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp index 2972550c..ab2b4651 100644 --- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp @@ -70,7 +70,16 @@ void MainUI::LoadArguments(QStringList args){ bool burnIMG = false; for(int i=0; i<args.length(); i++){ if(args[i]=="--burn-img"){ burnIMG = true; continue; } - if(QFile::exists(args[i])){ +/* + if(args[i]=="--ax"){i++; QString archivefile = args[i]; + QFileInfo filename(args[i]); + QDir filedir = filename.canonicalPath(); + QString newdir = filename.completeBaseName(); + filedir.mkpath(newdir); + BACKEND->startExtract(newdir, true, archivefile); + qApp->exit();} +*/ + if(QFile::exists(args[i])){ ui->label_progress->setText(tr("Opening Archive...")); BACKEND->loadFile(args[i]); ui->actionUSB_Image->setEnabled(args[i].simplified().endsWith(".img")); diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp index d3e1b453..2fb7c533 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp +++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp @@ -39,7 +39,7 @@ bool Browser::showingHiddenFiles(){ } // PRIVATE -void Browser::loadItem(QString info){ +void Browser::loadItem(QString info, Browser *obj){ //qDebug() << "LoadItem:" << info; //FileItem item; //itemame = info; @@ -58,7 +58,7 @@ void Browser::loadItem(QString info){ }*/ } //qDebug() << " - done with item:" << info; - this->emit threadDone(info, bytes); + obj->emit threadDone(info, bytes); } QIcon Browser::loadIcon(QString icon){ @@ -73,14 +73,14 @@ QIcon Browser::loadIcon(QString icon){ // PRIVATE SLOTS void Browser::fileChanged(QString file){ if(file.startsWith(currentDir+"/") ){ - if(QFile::exists(file) ){ QtConcurrent::run(this, &Browser::loadItem, file ); } //file modified but not removed + if(QFile::exists(file) ){ QtConcurrent::run(this, &Browser::loadItem, file, this); } //file modified but not removed else{ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } //file removed - need to update entire dir }else if(file==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } } void Browser::dirChanged(QString dir){ if(dir==currentDir){ QTimer::singleShot(500, this, SLOT(loadDirectory()) ); } - else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir ); } + else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir, this ); } } void Browser::futureFinished(QString name, QByteArray icon){ @@ -133,11 +133,11 @@ void Browser::loadDirectory(QString dir){ if(old.contains(path)){ old.removeAll(path); } oldFiles << path; //add to list for next time if(imageFormats.contains(path.section(".",-1).toLower()) || path.endsWith(".desktop")){ - QtConcurrent::run(this, &Browser::loadItem, path ); + QtConcurrent::run(this, &Browser::loadItem, path, this); //QCoreApplication::sendPostedEvents(); }else{ //No special icon loading - do it in-line here - loadItem(path); + loadItem(path, this); } } watcher->addPath(directory.absolutePath()); diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.h b/src-qt5/desktop-utils/lumina-fm/Browser.h index c4641277..b5c7c038 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.h +++ b/src-qt5/desktop-utils/lumina-fm/Browser.h @@ -45,7 +45,7 @@ private: QHash<QString, QIcon> mimeIcons; //cache for quickly re-using QIcons - void loadItem(QString info); //this is the main loader class - multiple instances each run in a separate thread + void loadItem(QString info, Browser *obj); //this is the main loader class - multiple instances each run in a separate thread QIcon loadIcon(QString icon); //simplification for using/populating the mimIcons cache private slots: |