aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-05-26 17:22:18 -0400
committerKen Moore <ken@ixsystems.com>2017-05-26 17:22:18 -0400
commitbf4c5e1358ce687ab9ad82fa1980077ca7028288 (patch)
treebfb821ee848aab1e2016968ce29112d860ef4323 /src-qt5/core
parentTurn off some debugging output in the LIconCache class. (diff)
downloadlumina-bf4c5e1358ce687ab9ad82fa1980077ca7028288.tar.gz
lumina-bf4c5e1358ce687ab9ad82fa1980077ca7028288.tar.bz2
lumina-bf4c5e1358ce687ab9ad82fa1980077ca7028288.zip
Adjust a couple size measurements so they work better across both normal and high-DPI screens.
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/lumina-desktop/BootSplash.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp13
2 files changed, 7 insertions, 8 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) );
}
}
}
bgstack15