mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Attempt a better layout for the download dialog
This seems to work well and provides a lot less wasted space. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									578e9c22af
								
							
						
					
					
						commit
						af3dd1e835
					
				
					 2 changed files with 83 additions and 91 deletions
				
			
		|  | @ -62,13 +62,9 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : | |||
| 	ui.downloadedView->setSelectionMode(QAbstractItemView::SingleSelection); | ||||
| 	int startingWidth = defaultModelFont().pointSize(); | ||||
| 	ui.downloadedView->setColumnWidth(0, startingWidth * 20); | ||||
| 	ui.downloadedView->setColumnWidth(1, startingWidth * 15); | ||||
| 	ui.downloadedView->setColumnWidth(1, startingWidth * 10); | ||||
| 	ui.downloadedView->setColumnWidth(2, startingWidth * 10); | ||||
| 	connect(ui.downloadedView, SIGNAL(clicked(QModelIndex)), diveImportedModel, SLOT(changeSelected(QModelIndex))); | ||||
| 	QRect mainGeometry = parent->geometry(); | ||||
| 	int width = mainGeometry.width() * 0.8; | ||||
| 	int height = mainGeometry.height() * 0.8; | ||||
| 	resize(width, height); | ||||
| 
 | ||||
| 	progress_bar_text = ""; | ||||
| 
 | ||||
|  |  | |||
|  | @ -20,120 +20,103 @@ | |||
|   </property> | ||||
|   <layout class="QVBoxLayout" name="vendorProductLabelLayout"> | ||||
|    <item> | ||||
|     <layout class="QGridLayout" name="vendorProductLayout"> | ||||
|      <item row="0" column="0"> | ||||
|       <widget class="QLabel" name="label"> | ||||
|        <property name="text"> | ||||
|         <string>Vendor</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item row="0" column="1"> | ||||
|       <widget class="QLabel" name="label_2"> | ||||
|        <property name="text"> | ||||
|         <string>Dive computer</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item row="1" column="0"> | ||||
|       <widget class="QComboBox" name="vendor"/> | ||||
|      </item> | ||||
|      <item row="1" column="1"> | ||||
|       <widget class="QComboBox" name="product"/> | ||||
|      </item> | ||||
|     </layout> | ||||
|    </item> | ||||
|    <item> | ||||
|     <layout class="QHBoxLayout" name="mainDialogLayout"> | ||||
|     <layout class="QHBoxLayout" name="mainDialogLayout" stretch="0,1"> | ||||
|      <item> | ||||
|       <layout class="QVBoxLayout" name="leftOfMainLayout"> | ||||
|        <item> | ||||
|         <layout class="QGridLayout" name="choicesLayout"> | ||||
|          <item row="0" column="0"> | ||||
|          <item row="4" column="0"> | ||||
|           <widget class="QLabel" name="label_3"> | ||||
|            <property name="text"> | ||||
|             <string>Device or mount point</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="1" column="0"> | ||||
|          <item row="5" column="0"> | ||||
|           <widget class="QComboBox" name="device"> | ||||
|            <property name="editable"> | ||||
|             <bool>true</bool> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="1" column="1"> | ||||
|          <item row="5" column="1"> | ||||
|           <widget class="QToolButton" name="search"> | ||||
|            <property name="text"> | ||||
|             <string>...</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="2" column="0"> | ||||
|          <item row="6" column="0"> | ||||
|           <widget class="QCheckBox" name="forceDownload"> | ||||
|            <property name="text"> | ||||
|             <string>Force download of all dives</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="3" column="0"> | ||||
|          <item row="7" column="0"> | ||||
|           <widget class="QCheckBox" name="preferDownloaded"> | ||||
|            <property name="text"> | ||||
|             <string>Always prefer downloaded dives</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="4" column="0"> | ||||
|          <item row="8" column="0"> | ||||
|           <widget class="QCheckBox" name="createNewTrip"> | ||||
|            <property name="text"> | ||||
|             <string>Download into new trip</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="5" column="0"> | ||||
|          <item row="9" column="0"> | ||||
|           <widget class="QCheckBox" name="logToFile"> | ||||
|            <property name="text"> | ||||
|             <string>Save libdivecomputer logfile</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="5" column="1"> | ||||
|          <item row="9" column="1"> | ||||
|           <widget class="QToolButton" name="chooseLogFile"> | ||||
|            <property name="text"> | ||||
|             <string>...</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="6" column="0"> | ||||
|          <item row="10" column="0"> | ||||
|           <widget class="QCheckBox" name="dumpToFile"> | ||||
|            <property name="text"> | ||||
|             <string>Save libdivecomputer dumpfile</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="6" column="1"> | ||||
|          <item row="10" column="1"> | ||||
|           <widget class="QToolButton" name="chooseDumpFile"> | ||||
|            <property name="text"> | ||||
|             <string>...</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="0" column="0" colspan="2"> | ||||
|           <widget class="QLabel" name="label"> | ||||
|            <property name="text"> | ||||
|             <string>Vendor</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="1" column="0" colspan="2"> | ||||
|           <widget class="QComboBox" name="vendor"/> | ||||
|          </item> | ||||
|          <item row="2" column="0" colspan="2"> | ||||
|           <widget class="QLabel" name="label_2"> | ||||
|            <property name="text"> | ||||
|             <string>Dive computer</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item row="3" column="0" colspan="2"> | ||||
|           <widget class="QComboBox" name="product"/> | ||||
|          </item> | ||||
|         </layout> | ||||
|        </item> | ||||
|        <item> | ||||
|         <spacer name="verticalSpacer"> | ||||
|          <property name="orientation"> | ||||
|           <enum>Qt::Vertical</enum> | ||||
|          </property> | ||||
|          <property name="sizeHint" stdset="0"> | ||||
|           <size> | ||||
|            <width>20</width> | ||||
|            <height>40</height> | ||||
|           </size> | ||||
|          </property> | ||||
|         </spacer> | ||||
|        </item> | ||||
|        <item> | ||||
|         <layout class="QHBoxLayout" name="downloadCancelRetryLayout"> | ||||
|          <item> | ||||
|  | @ -158,6 +141,57 @@ | |||
|          </item> | ||||
|         </layout> | ||||
|        </item> | ||||
|        <item> | ||||
|         <widget class="QProgressBar" name="progressBar"> | ||||
|          <property name="value"> | ||||
|           <number>0</number> | ||||
|          </property> | ||||
|         </widget> | ||||
|        </item> | ||||
|        <item> | ||||
|         <spacer name="aboveOKCancelSpacer"> | ||||
|          <property name="orientation"> | ||||
|           <enum>Qt::Vertical</enum> | ||||
|          </property> | ||||
|          <property name="sizeHint" stdset="0"> | ||||
|           <size> | ||||
|            <width>20</width> | ||||
|            <height>40</height> | ||||
|           </size> | ||||
|          </property> | ||||
|         </spacer> | ||||
|        </item> | ||||
|        <item> | ||||
|         <layout class="QHBoxLayout" name="buttonBoxLayout"> | ||||
|          <item> | ||||
|           <spacer name="horizontalSpacer"> | ||||
|            <property name="orientation"> | ||||
|             <enum>Qt::Horizontal</enum> | ||||
|            </property> | ||||
|            <property name="sizeHint" stdset="0"> | ||||
|             <size> | ||||
|              <width>40</width> | ||||
|              <height>20</height> | ||||
|             </size> | ||||
|            </property> | ||||
|           </spacer> | ||||
|          </item> | ||||
|          <item> | ||||
|           <widget class="QPushButton" name="ok"> | ||||
|            <property name="text"> | ||||
|             <string>OK</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|          <item> | ||||
|           <widget class="QPushButton" name="cancel"> | ||||
|            <property name="text"> | ||||
|             <string>Cancel</string> | ||||
|            </property> | ||||
|           </widget> | ||||
|          </item> | ||||
|         </layout> | ||||
|        </item> | ||||
|       </layout> | ||||
|      </item> | ||||
|      <item> | ||||
|  | @ -211,44 +245,6 @@ | |||
|      </item> | ||||
|     </layout> | ||||
|    </item> | ||||
|    <item> | ||||
|     <layout class="QHBoxLayout" name="buttonBoxLayout"> | ||||
|      <item> | ||||
|       <spacer name="horizontalSpacer"> | ||||
|        <property name="orientation"> | ||||
|         <enum>Qt::Horizontal</enum> | ||||
|        </property> | ||||
|        <property name="sizeHint" stdset="0"> | ||||
|         <size> | ||||
|          <width>40</width> | ||||
|          <height>20</height> | ||||
|         </size> | ||||
|        </property> | ||||
|       </spacer> | ||||
|      </item> | ||||
|      <item> | ||||
|       <widget class="QPushButton" name="ok"> | ||||
|        <property name="text"> | ||||
|         <string>OK</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|       <widget class="QPushButton" name="cancel"> | ||||
|        <property name="text"> | ||||
|         <string>Cancel</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|     </layout> | ||||
|    </item> | ||||
|    <item> | ||||
|     <widget class="QProgressBar" name="progressBar"> | ||||
|      <property name="value"> | ||||
|       <number>0</number> | ||||
|      </property> | ||||
|     </widget> | ||||
|    </item> | ||||
|   </layout> | ||||
|  </widget> | ||||
|  <resources/> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue