mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Better handling of default sizes on the Cylinder and Weight widgets
Better handling of default sizes on the Cylinder and weight widgets, the weigth widget didn't had a CSS applied so it looked odd compared to the cylinder one, also the default behavior for the combobox delegate didn't worked very well with the css applied, being too small. this patch fixes that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
		
							parent
							
								
									349a084496
								
							
						
					
					
						commit
						f9b4c6b889
					
				
					 6 changed files with 57 additions and 4 deletions
				
			
		|  | @ -79,12 +79,15 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), | |||
| 	connect(ui->cylinders, SIGNAL(clicked(QModelIndex)), ui->cylinders->model(), SLOT(remove(QModelIndex))); | ||||
| 	connect(ui->weights, SIGNAL(clicked(QModelIndex)), ui->weights->model(), SLOT(remove(QModelIndex))); | ||||
| 
 | ||||
| 	QFontMetrics metrics(defaultModelFont()); | ||||
| 
 | ||||
| 	ui->cylinders->setColumnWidth(CylindersModel::REMOVE, 24); | ||||
| 	ui->cylinders->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); | ||||
| 	ui->cylinders->horizontalHeader()->setResizeMode(CylindersModel::REMOVE, QHeaderView::Fixed); | ||||
| 	ui->cylinders->verticalHeader()->setDefaultSectionSize( metrics.height() +8 ); | ||||
| 	ui->cylinders->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate()); | ||||
| 	ui->weights->setColumnWidth(WeightModel::REMOVE, 24); | ||||
| 	ui->weights->horizontalHeader()->setResizeMode (WeightModel::REMOVE , QHeaderView::Fixed); | ||||
| 	ui->weights->verticalHeader()->setDefaultSectionSize( metrics.height() +8 ); | ||||
| 	ui->weights->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate()); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue