diff options
Diffstat (limited to 'src-qt5')
27 files changed, 236 insertions, 107 deletions
diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index fb44531a..fa272e8e 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -354,7 +354,8 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ } tmp = sysDefaults.filter("desktoplinks_"); - QString desktopFolder = QDir::homePath()+"/Desktop/"; //need to make this translatable and dynamic later + QString desktopFolder = LUtils::standardDirectory(LUtils::Desktop); + desktopFolder.append("/"); for(int i=0; i<tmp.length(); i++){ if(tmp[i].startsWith("#") || !tmp[i].contains("=") ){ continue; } QString var = tmp[i].section("=",0,0).toLower().simplified(); diff --git a/src-qt5/core/libLumina/LFileInfo.cpp b/src-qt5/core/libLumina/LFileInfo.cpp index d4e0cfde..8ca90979 100644 --- a/src-qt5/core/libLumina/LFileInfo.cpp +++ b/src-qt5/core/libLumina/LFileInfo.cpp @@ -35,19 +35,20 @@ void LFileInfo::loadExtraInfo(){ desk = 0; c_uid = geteuid(); //Now load the extra information - if(this->absoluteFilePath().startsWith("/net/") || this->isDir() ){ + QString abspath = this->absoluteFilePath(); + if( this->isDir() ){ mime = "inode/directory"; //Special directory icons QString name = this->fileName().toLower(); - if(name=="desktop"){ iconList << "user-desktop"; } + if(name=="desktop" || abspath == LUtils::standardDirectory(LUtils::Desktop, false) ){ iconList << "user-desktop"; } else if(name=="tmp"){ iconList << "folder-temp"; } - else if(name=="video" || name=="videos"){ iconList << "folder-video" << "camera-photo-film" ; } - else if(name=="music" || name=="audio"){ iconList << "folder-sound" << "media-playlist-audio"; } + else if(name=="video" || name=="videos" || abspath == LUtils::standardDirectory(LUtils::Videos, false)){ iconList << "folder-video" << "camera-photo-film" ; } + else if(name=="music" || name=="audio" || abspath == LUtils::standardDirectory(LUtils::Music, false)){ iconList << "folder-sound" << "media-playlist-audio"; } else if(name=="projects" || name=="devel"){ iconList << "folder-development"; } else if(name=="notes"){ iconList << "folder-txt" << "note-multiple-outline" << "note-multiple"; } - else if(name=="downloads"){ iconList << "folder-downloads" << "folder-download"; } - else if(name=="documents"){ iconList << "folder-documents"; } - else if(name=="images" || name=="pictures"){ iconList << "folder-image"; } + else if(name=="downloads" || abspath == LUtils::standardDirectory(LUtils::Downloads, false)){ iconList << "folder-downloads" << "folder-download"; } + else if(name=="documents" || abspath == LUtils::standardDirectory(LUtils::Documents, false)){ iconList << "folder-documents"; } + else if(name=="images" || name=="pictures" || abspath == LUtils::standardDirectory(LUtils::Pictures, false)){ iconList << "folder-image"; } else if(this->absoluteFilePath().startsWith("/net/")){ iconList << "folder-remote"; } else if( !this->isReadable() ){ iconList << "folder-locked"<< "folder-lock"; } iconList << "folder"; diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index 6ca8b679..7ff64adc 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -43,6 +43,73 @@ //============= // LUtils Functions //============= + +//Return the path to one of the XDG standard directories +QString LUtils::standardDirectory(StandardDir dir, bool createAsNeeded){ +// enum StandardDir {Desktop, Documents, Downloads, Music, Pictures, PublicShare, Templates, Videos} + QString var="XDG_%1_DIR"; + QString defval="$HOME"; + QString val; + switch (dir){ + case Desktop: + var = var.arg("DESKTOP"); + defval.append("/Desktop"); + break; + case Documents: + var = var.arg("DOCUMENTS"); + defval.append("/Documents"); + break; + case Downloads: + var = var.arg("DOWNLOAD"); + defval.append("/Downloads"); + break; + case Music: + var = var.arg("MUSIC"); + defval.append("/Music"); + break; + case Pictures: + var = var.arg("PICTURES"); + defval.append("/Pictures"); + break; + case PublicShare: + var = var.arg("PUBLICSHARE"); + break; + case Templates: + var = var.arg("TEMPLATES"); + break; + case Videos: + var = var.arg("VIDEOS"); + defval.append("/Videos"); + break; + } + //Read the XDG user dirs file (if it exists) + QString configdir = getenv("XDG_DATA_HOME"); + if(configdir.isEmpty()){ configdir = QDir::homePath()+"/.config"; } + QString conffile=configdir+"/user-dirs.dirs"; + if(QFile::exists(conffile)){ + static QStringList _contents; + static QDateTime _lastread; + if(_contents.isEmpty() || _lastread < QFileInfo(conffile).lastModified()){ + _contents = LUtils::readFile(conffile); + _lastread = QDateTime::currentDateTime(); + } + QStringList match = _contents.filter(var+"="); + if(!match.isEmpty()){ + val = match.first().section("=",-1).simplified(); + if(val.startsWith("\"")){ val = val.remove(0,1); } + if(val.endsWith("\"")){ val.chop(1); } + } + } + //Now check the value and return it + if(val.isEmpty()){ val = defval; }; //use the default value + val = val.replace("$HOME", QDir::homePath()); + if(createAsNeeded && !QFile::exists(val) ){ + QDir dir; + dir.mkpath(val); + } + return val; +} + QString LUtils::runCommand(bool &success, QString command, QStringList arguments, QString workdir, QStringList env){ QProcess proc; proc.setProcessChannelMode(QProcess::MergedChannels); //need output diff --git a/src-qt5/core/libLumina/LUtils.h b/src-qt5/core/libLumina/LUtils.h index ee04c023..f808f8c1 100644 --- a/src-qt5/core/libLumina/LUtils.h +++ b/src-qt5/core/libLumina/LUtils.h @@ -29,9 +29,13 @@ class LUtils{ public: + enum StandardDir {Desktop, Documents, Downloads, Music, Pictures, PublicShare, Templates, Videos}; + + //Return the path to one of the XDG standard directories + static QString standardDirectory(StandardDir dir, bool createAsNeeded = true); //Run an external command and return output & exit code - static QString runCommand(bool &success, QString command, QStringList arguments = QStringList(), QString workdir = "", QStringList env = QStringList()); + static QString runCommand(bool &success, QString command, QStringList arguments = QStringList(), QString workdir = "", QStringList env = QStringList()); //Run an external command and return the exit code static int runCmd(QString cmd, QStringList args = QStringList()); diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 7b87cf37..7726eed3 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -859,6 +859,19 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){ //if(tmp.isNull()){ tmp = QIcon::fromTheme(fallback); } } if(!tmp.isNull() && tmp.name()==iconName){ return tmp; } //found this in the theme + else if(iconName=="start-here-lumina"){ + //Additional fallback options for the OS-branded icon + QString osname = LOS::OSName().simplified().toLower(); + QStringList possible; possible << "distributor-logo-"+osname << osname; + QStringList words; + if(osname.contains(" ")){ words = osname.split(" "); } + else if(osname.contains("-")){ words = osname.split("-"); } + for(int i=0; i<words.length(); i++){ possible << "distributor-logo-"+words[i] << words[i]; } + //qDebug() << "Looking for possible OS icons:" << possible; + for(int i=0; i<possible.length(); i++){ + if(QIcon::hasThemeIcon(possible[i])){ return QIcon::fromTheme(possible[i]); } + } + } if(!fallback.isEmpty() && QIcon::hasThemeIcon(fallback)){ tmp = QIcon::fromTheme(fallback); return tmp; } //found this in the theme diff --git a/src-qt5/core/lumina-desktop/AppMenu.cpp b/src-qt5/core/lumina-desktop/AppMenu.cpp index 9ad51c93..136636e9 100644 --- a/src-qt5/core/lumina-desktop/AppMenu.cpp +++ b/src-qt5/core/lumina-desktop/AppMenu.cpp @@ -45,14 +45,8 @@ void AppMenu::updateAppList(){ APPS.clear(); //NOTE: Don't delete these pointers - the pointers are managed by the sysApps class and these are just references to them //qDebug() << "New Apps List:"; if(LSession::handle()->sessionSettings()->value("AutomaticDesktopAppLinks",true).toBool() && !lastHashUpdate.isNull() ){ - QString desktop = QDir::homePath()+"/"+tr("Desktop")+"/"; //translated desktop folder - if(!QFile::exists(desktop)){ - desktop = QDir::homePath()+"/Desktop/"; //desktop folder - if(!QFile::exists(desktop)){ - desktop = QDir::homePath()+"/desktop/"; //lowercase desktop folder - if(!QFile::exists(desktop)){ desktop.clear(); } - } - } + QString desktop = LUtils::standardDirectory(LUtils::Desktop); + desktop.append("/"); //qDebug() << "Update Desktop Folder:" << desktop << sysApps->removedApps << sysApps->newApps; QStringList tmp = sysApps->removedApps; for(int i=0; i<tmp.length() && !desktop.isEmpty(); i++){ diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 4f0ce447..e4706498 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -104,6 +104,7 @@ void LDesktop::UpdateGeometry(){ //qDebug() << " - Update Desktop Plugin Area"; //UpdateDesktopPluginArea(); //qDebug() << " - Done With Desktop Geom Updates"; + QTimer::singleShot(0, this, SLOT(UpdateBackground())); QTimer::singleShot(0, this, SLOT(UpdatePanels())); } @@ -685,8 +686,7 @@ void LDesktop::PasteInDesktop(){ } } //Now go through and paste all the designated files - QString desktop = QDir::homePath()+"/"+tr("Desktop"); //translated form - if(!QFile::exists(desktop)){ desktop = QDir::homePath()+"/Desktop"; } //default/untranslated form + QString desktop = LUtils::standardDirectory(LUtils::Desktop); for(int i=0; i<files.length(); i++){ QString path = files[i].section("::::",1,-1); if(!QFile::exists(path)){ continue; } //does not exist any more - move on to next diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 4a8a6794..7f7cc443 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -210,7 +210,7 @@ void LSession::setupSession(){ //Initialize the desktops splash.showScreen("desktop"); if(DEBUG){ qDebug() << " - Init Desktops:" << timer->elapsed();} - desktopFiles = QDir(QDir::homePath()+"/Desktop").entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); + desktopFiles = QDir(LUtils::standardDirectory(LUtils::Desktop)).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); updateDesktops(); //if(DEBUG){ qDebug() << " - Process Events (6x):" << timer->elapsed();} //for(int i=0; i<6; i++){ LSession::processEvents(); } //Run through this a few times so the interface systems get up and running @@ -227,8 +227,7 @@ void LSession::setupSession(){ watcherChange( confdir+"/fluxbox-keys" ); watcherChange( confdir+"/favorites.list" ); //Try to watch the localized desktop folder too - if(QFile::exists(QDir::homePath()+"/"+tr("Desktop"))){ watcherChange( QDir::homePath()+"/"+tr("Desktop") ); } - watcherChange( QDir::homePath()+"/Desktop" ); + watcherChange( LUtils::standardDirectory(LUtils::Desktop) ); //And watch the /media directory, and /run/media/USERNAME directory if(QFile::exists("/media")){ watcherChange("/media"); } QString userMedia = QString("/run/media/%1").arg(QDir::homePath().split("/").takeLast()); @@ -419,7 +418,7 @@ void LSession::watcherChange(QString changed){ } emit SessionConfigChanged(); }else if(changed.endsWith("desktopsettings.conf") ){ emit DesktopConfigChanged(); } - else if(changed == QDir::homePath()+"/Desktop" || changed == QDir::homePath()+"/"+tr("Desktop") ){ + else if(changed == LUtils::standardDirectory(LUtils::Desktop) ){ desktopFiles = QDir(changed).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs ,QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); if(DEBUG){ qDebug() << "New Desktop Files:" << desktopFiles.length(); } emit DesktopFilesChanged(); diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index c4707626..7ecebdcc 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -141,6 +141,10 @@ void LSession::start(bool unified){ setenv("QT_QPA_PLATFORMTHEME","lthemeengine", true); setenv("QT_NO_GLIB", "1", 1); //Disable the glib event loop within Qt at runtime (performance hit + bugs) unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); //need exact-pixel measurements (no fake scaling) + if(LUtils::isValidBinary("xdg-user-dirs-update")){ + //Make sure the XDG user directories are created as needed first + QProcess::execute("xdg-user-dirs-update"); + } if(!unified){ QSettings sessionsettings("lumina-desktop","sessionsettings"); @@ -181,13 +185,13 @@ void LSession::start(bool unified){ startProcess("wm", WM); } //Desktop Next - startProcess("runtime","lumina-desktop"); + startProcess("runtime","lumina-desktop -new-instance"); //ScreenSaver if(LUtils::isValidBinary("xscreensaver")){ startProcess("screensaver","xscreensaver -no-splash"); } }else{ //unified process setupCompositor(true); //required for Lumina 2 - startProcess("runtime","lumina-desktop-unified"); + startProcess("runtime","lumina-desktop-unified -new-instance"); } } diff --git a/src-qt5/core/lumina-theme-engine/colors/trident-dark.conf b/src-qt5/core/lumina-theme-engine/colors/trident-dark.conf index b3d3ab45..912ee30c 100644 --- a/src-qt5/core/lumina-theme-engine/colors/trident-dark.conf +++ b/src-qt5/core/lumina-theme-engine/colors/trident-dark.conf @@ -1,4 +1,4 @@ [ColorScheme] -active_colors=#ffffff, #3d3d40, #979797, #5e5c5b, #302f2e, #4a4947, #ffffff, #ffffff, #ffffff, #5d5d5d, #3a3636, #e7e4e0, #1a59c3, #f9f9f9, #0986d3, #a70b06, #7a7978, #ffffff, #3f3f36, #ffffff -disabled_colors=#808080, #3d3d40, #979797, #5e5c5b, #302f2e, #4a4947, #808080, #ffffff, #808080, #5d5d5d, #3a3636, #e7e4e0, #1a59c3, #808080, #0986d3, #a70b06, #7a7978, #ffffff, #3f3f36, #ffffff -inactive_colors=#ffffff, #3d3d40, #979797, #5e5c5b, #302f2e, #4a4947, #ffffff, #ffffff, #ffffff, #5d5d5d, #3a3636, #e7e4e0, #1a59c3, #f9f9f9, #0986d3, #a70b06, #7a7978, #ffffff, #3f3f36, #ffffff +active_colors=#ffffff, #3d3d40, #b3b3b3, #5e5c5b, #333333, #4a4947, #ffffff, #ffffff, #ffffff, #333333, #333333, #e7e4e0, #1a59c3, #f9f9f9, #0986d3, #a70b06, #7a7978, #ffffff, #3f3f36, #ffffff +disabled_colors=#808080, #3d3d40, #b3b3b3, #5e5c5b, #333333, #4a4947, #b3b3b3, #ffffff, #b3b3b3, #333333, #333333, #e7e4e0, #1a59c3, #808080, #0986d3, #a70b06, #7a7978, #ffffff, #3f3f36, #ffffff +inactive_colors=#ffffff, #3d3d40, #b3b3b3, #5e5c5b, #333333, #4a4947, #ffffff, #ffffff, #ffffff, #333333, #333333, #e7e4e0, #1a59c3, #f9f9f9, #0986d3, #a70b06, #7a7978, #ffffff, #3f3f36, #ffffff diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass-desktop-icons.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass-desktop-icons.qss new file mode 100644 index 00000000..e3348e81 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass-desktop-icons.qss @@ -0,0 +1,11 @@ +LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{ + background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(5, 5, 5, 30), stop:1 rgba(2, 2, 2, 70)); + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(0, 0, 0, 30), stop:0.724868 rgba(0, 0, 0, 60), stop:1 rgba(0, 0, 0, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + color: white; +} diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss index 2de9fefa..975b486b 100644 --- a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss @@ -8,28 +8,26 @@ LDPlugin#applauncher{ border: none; } LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{ - background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(5, 5, 5, 30), stop:1 rgba(2, 2, 2, 70)); - border-width: 3px; - border-style: solid; - border-radius: 5px; - border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(0, 0, 0, 30), stop:0.724868 rgba(0, 0, 0, 60), stop:1 rgba(0, 0, 0, 10)); - border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); - border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); - border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + background-color: transparent; + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-color: transparent; color: white; } LDPlugin#applauncher QToolButton:hover, LDPlugin#desktopview QListWidget::item:hover{ background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); color: palette(highlighted-text); - border-width: 3px; - border-style: solid; - border-radius: 5px; + border-width: 3px; + border-style: solid; + border-radius: 5px; border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); } + QWidget#LuminaPanelColor{ background: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(2, 2, 2, 60), stop:1 rgba(0, 0, 0, 110)); border-radius: 3px; diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/Glass-desktop-icons.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass-desktop-icons.qss new file mode 100644 index 00000000..6385c652 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass-desktop-icons.qss @@ -0,0 +1,11 @@ +LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{ + background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(250, 250, 250, 30), stop:1 rgba(252, 252, 252, 70)); + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + color: white; +} diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss index 502c0a44..9d610c60 100644 --- a/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss @@ -8,14 +8,11 @@ LDPlugin#applauncher{ border: none; } LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{ - background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(250, 250, 250, 30), stop:1 rgba(252, 252, 252, 70)); - border-width: 3px; - border-style: solid; - border-radius: 5px; - border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); - border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); - border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); - border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + background-color: transparent; + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-color: transparent; color: white; } diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp index 3d901e8c..eeb0f507 100644 --- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp @@ -110,7 +110,7 @@ void MainUI::LoadArguments(QStringList args){ connect(BACKEND, SIGNAL(ExtractSuccessful()), delayClose, SLOT(start()) ); } BACKEND->loadFile(files[0]); - ui->actionUSB_Image->setEnabled(files[0].simplified().endsWith(".img")); + ui->actionUSB_Image->setEnabled(files[0].simplified().endsWith(".img") || files[0].simplified().endsWith(".iso")); if(action==0){ BurnImgToUSB(); } //Go ahead and launch the burn dialog right away } diff --git a/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp b/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp index 413c5fad..c353b751 100644 --- a/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp @@ -18,7 +18,7 @@ imgDialog::imgDialog(QWidget *parent) : QDialog(parent), ui(new Ui::imgDialog()){ ui->setupUi(this); //load the designer form - QString title = tr("Burn IMG to Device"); + QString title = tr("Burn Disk Image to Device"); if( getuid()==0){ title.append(" ("+tr("Admin Mode")+")"); } this->setWindowTitle(title); ui->frame_running->setVisible(false); @@ -107,7 +107,7 @@ void imgDialog::cancel(){ this->close(); }else{ //Prompt if the transfer should be cancelled - if(QMessageBox::Yes == QMessageBox::question(this, tr("Cancel Image Burn?"), tr("Do you wish to stop the current IMG burn process?")+"\n\n"+tr("Warning: This will leave the USB device in an inconsistent state")) ){ + if(QMessageBox::Yes == QMessageBox::question(this, tr("Cancel Image Burn?"), tr("Do you wish to stop the current disk image burn process?")+"\n\n"+tr("Warning: This will leave the USB device in an inconsistent state")) ){ ddProc->kill(); } } @@ -175,7 +175,7 @@ void imgDialog::procFinished(){ QMessageBox::warning(this, tr("ERROR"), tr("The process could not be completed:")+"\n\n"+lastmsg); } }else{ - QMessageBox::information(this, tr("SUCCESS"), tr("The image was successfully burned to the USB device") ); + QMessageBox::information(this, tr("SUCCESS"), tr("The image was successfully burned to the device") ); this->close(); } } diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp index f64106d3..d6597705 100644 --- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp @@ -129,12 +129,16 @@ void PrintWidget::setCurrentPage(int pageNumber) { this->centerOn(pages.at(curPage-1)); } } + + //qDebug() << "Page Set"; } void PrintWidget::highlightText(TextData *text) { //Creates a rectangle around the text if the text has not already been highlighted + //qDebug() << "Page:" << text->page() << "Loc:" << text->loc(); if(!text->highlighted() && !text->loc().isNull()) { int degrees = BACKEND->rotatedDegrees(); + //qDebug() << "Degrees:" << degrees; //Shows the text's location on a non-rotated page QRectF rect = text->loc(); //Rotates the rectangle by the page's center and gets the right calculation for text's new location @@ -154,12 +158,18 @@ void PrintWidget::highlightText(TextData *text) { else rect.adjust(cy, cx, cy, cx); } + + //qDebug() << "Post Degrees:" << rect; //Moves the rectangle onto the right page double pageHeight = 0; for(int i = 0; i < text->page() - 1; i++) pageHeight += pages.at(i)->boundingRect().height(); + //qDebug() << "PageHeight:" << pageHeight; + rect.moveTop(rect.y() + pageHeight); + + //qDebug() << "Final Rect:" << rect; //Transparent yellow for the highlight box QBrush highlightFill(QColor(255, 255, 177, 100)); QPen highlightOutline(QColor(255, 255, 100, 125)); @@ -388,6 +398,7 @@ void PrintWidget::fit(bool doFitting) { } void PrintWidget::goToPosition(int pagenum, float x, float y) { + //qDebug() << "Page:" << pagenum << "X:" << x << "Y:" << y; setCurrentPage(pagenum); QScrollBar *hsc = this->horizontalScrollBar(); @@ -398,9 +409,13 @@ void PrintWidget::goToPosition(int pagenum, float x, float y) { double realHeight = pages.at(pagenum-1)->boundingRect().height(); double virtualHeight = qAbs(pt2.y() - pt.y()); + //qDebug() << "Real:" << realHeight << "Virtual:" << virtualHeight; + int yConv = int(pt.y() + y*(virtualHeight/realHeight)) - 30; int xConv = int(pt.x() + x*(virtualHeight/realHeight)) - 30; + //qDebug() << "newX:" << xConv << "newY:" << yConv; + if(yConv > vsc->maximum()) vsc->triggerAction(QAbstractSlider::SliderToMaximum); else if(y != 0) diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h index c353cb84..8e365a99 100644 --- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h +++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h @@ -298,7 +298,7 @@ protected: if(PageItem *page = dynamic_cast<PageItem*>(item)) linkList = page->childItems(); - else + else if(item != dynamic_cast<QGraphicsRectItem*>(item)) linkList = item->parentItem()->childItems(); if(LinkItem *link = dynamic_cast<LinkItem*>(item)){ diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp index a52fd5b4..7d5e1f64 100644 --- a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp @@ -65,6 +65,7 @@ class Data { fz_context* getContext() { return ctx; } fz_display_list* getDisplayList() { return list; } QRectF getScaledRect() { return convertRect(bbox, sf); } + QRectF getScaledRect(fz_rect &rect) { return convertRect(rect, sf); } fz_rect getBoundingBox() { return bbox; } fz_matrix getMatrix() { return ctm; } QImage getImage() { return img; } @@ -144,7 +145,7 @@ Renderer::Renderer(){ locks.unlock = unlock_mutex; DOC = 0; - qDebug() << "Creating Context"; + //qDebug() << "Creating Context"; CTX = fz_new_context(NULL, &locks, FZ_STORE_UNLIMITED); needpass = false; degrees = 0; @@ -152,7 +153,7 @@ Renderer::Renderer(){ Renderer::~Renderer(){ //pdf_clean_page_contents - qDebug() << "Dropping Context"; + //qDebug() << "Dropping Context"; clearHash(); fz_drop_document(CTX, DOC); DOC = NULL; @@ -216,7 +217,7 @@ bool Renderer::loadDocument(QString path, QString password){ docpath = path; DOC = fz_open_document(CTX, path.toLocal8Bit().data()); - qDebug() << "File opened" << DOC; + //qDebug() << "File opened" << DOC; if(DOC==0){ qDebug() << "Could not open file:" << path; return false; @@ -230,13 +231,13 @@ bool Renderer::loadDocument(QString path, QString password){ if(needpass){ return false; } //incorrect password } - qDebug() << "Password Check cleared"; + //qDebug() << "Password Check cleared"; pnum = fz_count_pages(CTX, DOC); qDebug() << "Page count: " << pnum; doctitle.clear(); - qDebug() << "Opening File:" << path; + //qDebug() << "Opening File:" << path; jobj.insert("subject", getTextInfo("Subject") ); jobj.insert("author", getTextInfo("Author") ); jobj.insert("creator", getTextInfo("Creator") ); @@ -255,8 +256,8 @@ bool Renderer::loadDocument(QString path, QString password){ fz_outline *outline = fz_load_outline(CTX, DOC); if(outline) traverseOutline(outline, 0); - else - qDebug() << "No Bookmarks"; + //else + //qDebug() << "No Bookmarks"; fz_drop_outline(CTX, outline); @@ -555,7 +556,7 @@ QList<TextData*> Renderer::searchDocument(QString text, bool matchCase){ int count = fz_search_display_list(CTX, dataHash[i]->getDisplayList(), text.toLocal8Bit().data(), rectBuffer, 1000); //qDebug() << "Page " << i+1 << ": Count, " << count; for(int j = 0; j < count; j++) { - TextData *t = new TextData(dataHash[i]->getScaledRect(), i+1, text); + TextData *t = new TextData(dataHash[i]->getScaledRect(rectBuffer[j]), i+1, text); //MuPDF search does not match case, so retrieve the exact text at the location found and determine whether or not it matches the case of the search text if the user selected to match case if(matchCase){ fz_stext_page *sPage = fz_new_stext_page_from_display_list(CTX, dataHash[i]->getDisplayList(), NULL); diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp index f0b64948..b44cd8f2 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp @@ -355,7 +355,7 @@ void MainUI::endPresentation(){ } void MainUI::startLoadingPages(int degrees){ - qDebug() <<"Start Loading Pages"; + //qDebug() <<"Start Loading Pages"; //if(BACKEND->hashSize() != 0) { return; } //currently loaded[ing] loadingQueue.clear(); BACKEND->clearHash(); @@ -420,7 +420,7 @@ void MainUI::paintToPrinter(QPrinter *PRINTER){ int copies = PRINTER->copyCount(); bool collate = PRINTER->collateCopies(); bool reverse = (PRINTER->pageOrder()==QPrinter::LastPageFirst); - qDebug() << "PRINTER DPI:" << PRINTER->resolution() << PRINTER->supportedResolutions(); + //qDebug() << "PRINTER DPI:" << PRINTER->resolution() << PRINTER->supportedResolutions(); if(PRINTER->resolution() < 300){ //Try to get 300 DPI resolution at least PRINTER->setResolution(300); @@ -632,10 +632,11 @@ void MainUI::find(QString text, bool forward) { TextData *currentText = results[currentHighlight]; - if(BACKEND->supportsExtraFeatures()) + if(BACKEND->supportsExtraFeatures()) { WIDGET->highlightText(currentText); - }else{ - ui->resultsLabel->setText("No results found"); + }else{ + ui->resultsLabel->setText("No results found"); + } } } } diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp index 48a4ceb4..97042f9c 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp @@ -22,7 +22,6 @@ MainUI::MainUI() IMG = new ImageEditor(this); ui->scrollArea->setWidget(IMG); areaOverlay = 0; - ppath = QDir::homePath(); ui->label_zoom_percent->setMinimumWidth( ui->label_zoom_percent->fontMetrics().width("200%") ); setupIcons(); ui->spin_monitor->setMaximum(QApplication::desktop()->screenCount()); @@ -60,6 +59,7 @@ MainUI::MainUI() connect(tabbar, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)) ); connect(ui->check_show_popups, SIGNAL(toggled(bool)), this, SLOT(showPopupsChanged(bool)) ); settings = LUtils::openSettings("lumina-desktop", "lumina-screenshot",this); + ppath = settings->value("previous-path", QDir::homePath()).toString(); QString opt = settings->value("screenshot-target", "window").toString(); if( opt == "window") {ui->radio_window->setChecked(true); } else if(opt=="area"){ ui->radio_area->setChecked(true); } @@ -129,6 +129,7 @@ void MainUI::saveScreenshot(){ }else{ picSaved = true; ppath = filepath.section("/",0,-2); //just the directory + settings->setValue("previous-path", ppath); if (closeOnSave) { // We came here from close, now we need to close *after* handling // the current screen event. diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp index bc08e521..298fedde 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp @@ -277,7 +277,7 @@ void MainUI::OpenFile(QString file){ edit->document()->setDefaultFont(font); /*QStringList applicationDirs = LXDG::systemApplicationDirs();*/ if(ui->actionEnable_Spellcheck->isChecked()) { - QStringList dirs = QString(getenv("XDG_DATA_DIRS")).split(":"); + /*QStringList dirs = QString(getenv("XDG_DATA_DIRS")).split(":"); foreach(QString dir, dirs) { if(QDir(dir).exists("hunspell")) { //Default to US English Dictionary @@ -285,7 +285,7 @@ void MainUI::OpenFile(QString file){ hunspell = new Hunspell(QString(hunspellPath + "en_US.aff").toLocal8Bit(), QString(hunspellPath + "en_US.dic").toLocal8Bit()); edit->setDictionary(hunspell); } - } + }*/ } } tabWidget->setCurrentWidget(edit); @@ -413,7 +413,7 @@ void MainUI::ModifyColors(){ } void MainUI::SetLanguage() { - QDir dir(hunspellPath); + /*QDir dir(hunspellPath); QStringList files = dir.entryList(QStringList() << "*.dic", QDir::Files); QStringList items; int defaultDic = 0; @@ -431,7 +431,7 @@ void MainUI::SetLanguage() { hunspell = new Hunspell(QString(hunspellPath+dic+".aff").toLocal8Bit(), QString(hunspellPath+dic+".dic").toLocal8Bit()); - checkSpelling(-1); + checkSpelling(-1);*/ } void MainUI::showPopupWarnings(bool show){ @@ -439,13 +439,13 @@ void MainUI::showPopupWarnings(bool show){ } void MainUI::enableSpellcheck(bool show){ - qDebug() << "Enabling Spellcheck"; + /*qDebug() << "Enabling Spellcheck"; settings->setValue("enableSpellcheck",show); if(currentEditor() != NULL and hunspell == NULL) { - /*QStringList applicationDirs = LXDG::systemApplicationDirs();*/ + //QStringList applicationDirs = LXDG::systemApplicationDirs(); hunspell = new Hunspell(QString(hunspellPath + "en_US.aff").toLocal8Bit(), QString(hunspellPath + "en_US.dic").toLocal8Bit()); qDebug() << "Hunspell Created"; - } + }*/ } void MainUI::showToolbar(bool show){ @@ -621,22 +621,30 @@ PlainTextEditor *cur = currentEditor(); } void MainUI::checkWord(QTextBlock block) { - PlainTextEditor *cur = currentEditor(); + /*PlainTextEditor *cur = currentEditor(); if(cur==0){ return; } + if(block.text().simplified().isEmpty()){ return; } foreach(Word *word, wordList) { - if(word->blockNum == block.blockNumber()) + if(word->blockNum == block.blockNumber()){ + qDebug() << "Remove Word"; wordList.removeOne(word); + } } QStringList words = block.text().split(QRegExp("\\W+")); + qDebug() << "Got Words:" << words; QTextCursor cursor(block); foreach(QString word, words) { + qDebug() << "Check Word:" << word; if(!hunspell->spell(word.toStdString())) { - QList<QString> suggestions; - foreach(std::string newWord, hunspell->suggest(word.toStdString())) + qDebug() << "Not a word"; + QStringList suggestions; + foreach(std::string newWord, hunspell->suggest(word.toStdString())){ suggestions.append(QString::fromStdString(newWord)); + } + qDebug() << "Got Suggestions:" << suggestions; QTextEdit::ExtraSelection sel; sel.format.setBackground(QColor("Red")); sel.cursor = cur->document()->find(word, cursor.position()); @@ -644,27 +652,31 @@ void MainUI::checkWord(QTextBlock block) { wordList.append(wordC); } cursor.movePosition(QTextCursor::NextWord, QTextCursor::MoveAnchor); - } + }*/ } void MainUI::checkSpelling(int bpos, int epos) { - //qDebug() << "Checking spelling on"; + qDebug() << "Checking spelling on" << bpos << epos; PlainTextEditor *cur = currentEditor(); if(cur==0){ return; } static int numBlocks = cur->blockCount(); - - if(bpos == -1 or numBlocks != cur->blockCount()) { //When opening a file or loading a new dictionary - for(QTextBlock block = cur->document()->begin(); block != cur->document()->end(); block = block.next()) + //qDebug() << " - numblocks:" << numBlocks; + if(bpos == -1 || numBlocks != cur->blockCount()) { //When opening a file or loading a new dictionary + for(QTextBlock block = cur->document()->begin(); block != cur->document()->end(); block = block.next()){ + //qDebug() << " - Check Block:" << block.text(); checkWord(block); + } numBlocks = cur->blockCount(); }else if(epos == -1){ //Normal checking of one block from typing QTextBlock block = cur->document()->findBlock(bpos); + //qDebug() << " - Check Block:" << block.text(); checkWord(block); }else { //Check blocks after copy/paste for(QTextBlock block = cur->document()->findBlock(0); block != cur->document()->findBlock(epos); block = block.next()) { checkWord(block); } } + //qDebug() << " - set Word List:" << wordList; cur->setWordList(wordList); } diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.h b/src-qt5/desktop-utils/lumina-textedit/MainUI.h index 90222cb3..38a742dd 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.h +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.h @@ -21,7 +21,7 @@ #include "DnDTabBar.h" #include "Word.h" -#include <hunspell/hunspell.hxx> +//#include <hunspell/hunspell.hxx> namespace Ui{ class MainUI; @@ -46,16 +46,16 @@ private: QShortcut *closeFindS, *nextTabS, *prevTabS; QSpinBox *fontSizes; QAction *label_readonly; - Hunspell *hunspell; - QList<Word*> wordList; - QString hunspellPath; + //Hunspell *hunspell; + QList<Word*> wordList; + QString hunspellPath; //Simplification functions PlainTextEditor* currentEditor(); - QString currentFile(); + QString currentFile(); QString currentFileDir(); QStringList unsavedFiles(); - void checkWord(QTextBlock); + void checkWord(QTextBlock); private slots: //Main Actions @@ -70,8 +70,8 @@ private slots: void updateStatusTip(); void changeFontSize(int newFontSize); void changeTabsLocation(QAction*); - void checkSpelling(int bpos, int epos = -1); - void SetLanguage(); + void checkSpelling(int bpos, int epos = -1); + void SetLanguage(); //Other Menu Actions void UpdateHighlighting(QAction *act = 0); @@ -88,8 +88,8 @@ private slots: void tabClosed(int); void tabDetached(int); void tabDraggedOut(int, Qt::DropAction); - void nextTab(); - void prevTab(); + void nextTab(); + void prevTab(); //Find/Replace functions void closeFindReplace(); diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp index d1f29974..07b99f27 100644 --- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp @@ -291,7 +291,6 @@ void PlainTextEditor::LNW_updateWidth(){ void PlainTextEditor::LNW_highlightLine(){ QList<QTextEdit::ExtraSelection> sels; - foreach(Word *word, wordList) { sels.append(word->sel); }; if(this->isReadOnly()){ return; } QColor highC = QColor(0,0,0,50); //just darken the line a bit diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h index 8ca8037d..8f174d4b 100644 --- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h +++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h @@ -13,7 +13,7 @@ #include <QPaintEvent> #include <QFileSystemWatcher> -#include <hunspell/hunspell.hxx> +//#include <hunspell/hunspell.hxx> #include "syntaxSupport.h" #include "Word.h" @@ -34,7 +34,7 @@ public: void LoadFile(QString filepath); bool SaveFile(bool newname = false); QString currentFile(); - Word *wordAtPosition(int, int); + Word *wordAtPosition(int, int); bool hasChange(); bool readOnlyFile(); @@ -43,10 +43,10 @@ public: int LNWWidth(); //replacing the LNW size hint detection void paintLNW(QPaintEvent *ev); //forwarded from the LNW paint event void updateLNW(); - void setWordList(QList<Word*> _wordList) { wordList = _wordList; } - void setDictionary(Hunspell *_hunspell) { hunspell = _hunspell; } + void setWordList(QList<Word*> _wordList) { wordList = _wordList; } + //void setDictionary(Hunspell *_hunspell) { hunspell = _hunspell; } - QFontMetrics *metrics; + QFontMetrics *metrics; private: QWidget *LNW; //Line Number Widget @@ -54,10 +54,10 @@ private: QSettings *settings; QString lastSaveContents; QFileSystemWatcher *watcher; - QList<Word*> wordList; + QList<Word*> wordList; //Syntax Highlighting class Custom_Syntax *SYNTAX; - Hunspell *hunspell; + //Hunspell *hunspell; //Bracket/Perentheses matching functions int matchleft, matchright; //positions within the document diff --git a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro index 5ebbd9d0..a69fc0c2 100644 --- a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro +++ b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro @@ -27,7 +27,7 @@ SOURCES += main.cpp \ FORMS += MainUI.ui \ ColorDialog.ui -LIBS += -lhunspell-1.6 +#LIBS += -lhunspell-1.6 TRANSLATIONS = i18n/l-te_af.ts \ i18n/l-te_ar.ts \ diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax index 3cd0a7b6..a8e740a0 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax @@ -22,39 +22,39 @@ }, { "name": "bold and italic", - "regex" : "[\\*]{3}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{3}", + "regex" : "(\\s|^)[[\\*]{3}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{3}(\\s|$)", "foreground": "colors/altkeyword", "font_weight" : "bold", "font_style" : "italic" }, { "name": "bold", - "regex" : "[\\*]{2}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{2}", + "regex" : "(\\s|^)[\\*]{2}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{2}(\\s|$)", "foreground": "colors/altkeyword", "font_weight" : "bold" }, { "name": "italic", - "regex" : "[\\*](?!\\s){1}[^\\*\\_]+(?!\\s)[\\*]{1}", + "regex" : "(\\s|^)[\\*](?!\\s){1}[^\\*\\_]+(?!\\s)[\\*]{1}(\\s|$)", "foreground": "colors/altkeyword", "font_style" : "italic" }, { "name": "bold and italic", - "regex" : "[_]{3}(?!\\s)[^\\*\\_]+(?!\\s)[_]{3}", + "regex" : "(\\s|^)[_]{3}(?!\\s)[^\\*\\_]+(?!\\s)[_]{3}(\\s|$)", "foreground": "colors/altkeyword", "font_weight" : "bold", "font_style" : "italic" }, { "name": "bold", - "regex" : "[_]{2}(?!\\s)[^\\*\\_]+(?!\\s)[_]{2}", + "regex" : "(\\s|^)[_]{2}(?!\\s)[^\\*\\_]+(?!\\s)[_]{2}(\\s|$)", "foreground": "colors/altkeyword", "font_weight" : "bold" }, { "name": "italic", - "regex" : "[_]{1}(?!\\s)[^\\*\\_]+(?!\\s)[_]{1}", + "regex" : "(\\s|^)[_]{1}(?!\\s)[^\\*\\_]+(?!\\s)[_]{1}(\\s|$)", "foreground": "colors/altkeyword", "font_style" : "italic" }, |