Author: mir3x
Date: Sun Nov  6 22:16:54 2016
New Revision: 34419

URL: http://svn.gna.org/viewcvs/freeciv?rev=34419&view=rev
Log:
Qt client - added border around savegame preview

See patch #7937

Modified:
    trunk/client/gui-qt/pages.cpp
    trunk/data/themes/gui-qt/NightStalker/resource.qss

Modified: trunk/client/gui-qt/pages.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/pages.cpp?rev=34419&r1=34418&r2=34419&view=diff
==============================================================================
--- trunk/client/gui-qt/pages.cpp       (original)
+++ trunk/client/gui-qt/pages.cpp       Sun Nov  6 22:16:54 2016
@@ -469,6 +469,8 @@
   lbl_show_preview = new QLabel(_("Show preview"));
   sav << _("Choose Saved Game to Load") << _("Date");
   load_pix = new QLabel;
+  load_pix->setProperty("themed_border", true);
+  load_pix->setFixedSize(0 ,0);
   load_save_text = new QLabel;
   load_save_text->setTextFormat(Qt::RichText);
   load_save_text->setWordWrap(true);
@@ -500,7 +502,7 @@
           SLOT(state_preview(int)));
   pages_layout[PAGE_LOAD]->addWidget(wdg, 1, 0);
   pages_layout[PAGE_LOAD]->addWidget(load_save_text, 2, 0, 1, 2);
-  pages_layout[PAGE_LOAD]->addWidget(load_pix, 2, 3, 1, 1);
+  pages_layout[PAGE_LOAD]->addWidget(load_pix, 2, 2, 1, 2);
 
   but = new QPushButton;
   but->setText(_("Browse..."));
@@ -1294,7 +1296,8 @@
         } else {
           load_pix->setPixmap(*(new QPixmap));
         }
-
+        load_pix->setFixedSize(load_pix->pixmap()->width(),
+                               load_pix->pixmap()->height());
         if ((sf = secfile_load_section(current_file.toLocal8Bit().data(),
                                        "research", TRUE))) {
           sname = secfile_lookup_str_default(sf, nullptr,

Modified: trunk/data/themes/gui-qt/NightStalker/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/NightStalker/resource.qss?rev=34419&r1=34418&r2=34419&view=diff
==============================================================================
--- trunk/data/themes/gui-qt/NightStalker/resource.qss  (original)
+++ trunk/data/themes/gui-qt/NightStalker/resource.qss  Sun Nov  6 22:16:54 2016
@@ -39,6 +39,10 @@
   border: none;
   border-radius: none;
   margin-top: 2ex;
+}
+
+*[themed_border="true"] {
+  border: 2px solid #3399FF;
 }
 
 *[themed_groupbox="true"]::title {
@@ -839,3 +843,4 @@
   color: white;
 }
 
+


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to