Skip to content

Commit 6a53bca

Browse files
committed
Slightly improve "Isotopics from peaks" tool layout when window is not that wide - not great - but better than nothing.
1 parent 98867ff commit 6a53bca

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

InterSpec_resources/RelActManualGui.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
div.RelActManualGui
2+
{
3+
overflow-x: hidden;
4+
}
15

26
.RelActNucCol
37
{
4-
8+
/* Use a fixed width for now. */
9+
width: 188px;
10+
overflow-x: hidden;
511
}
612

713
.RelActNucCol .ToolTabColumnTitle
814
{
9-
/* Set the approx with for when no nuclides are inserted.*/
10-
min-width: 175px;
1115
}
1216

1317
.ManRelEffNucDisp.Wt-panel
@@ -165,6 +169,7 @@
165169
.RelActNucCol .ToolTabTitledColumnContent
166170
{
167171
overflow-y: auto;
172+
overflow-x: hidden;
168173
}
169174

170175

src/RelActManualGui.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,13 @@ RelActManualGui::RelActManualGui( InterSpec *viewer, Wt::WContainerWidget *paren
425425
wApp->useStyleSheet( "InterSpec_resources/RelActManualGui.css" );
426426

427427
addStyleClass( "EnergyCalTool RelActManualGui" );
428+
429+
// If the widget gets to less than about 1145px wide, then Wt layout will start shrinking
430+
// the columns, even though they are fixed or minimum sized. When this happens if we dont
431+
// set the vertical overflow to hidden, a useless horizantal scrollbar will show up on the
432+
// entire bottom of the widget (but it only will ever scroll for like 5 px - probably just
433+
// padding somewhere), even though each column will also get scrollbars or be squeezed.
434+
setOverflow( Overflow::OverflowHidden, Wt::Orientation::Horizontal );
428435

429436
init();
430437
}//RelActManualGui constructor
@@ -788,6 +795,7 @@ void RelActManualGui::init()
788795

789796
WContainerWidget *resultContent = new WContainerWidget();
790797
resultContent->addStyleClass( "ToolTabTitledColumnContent ResultColumnContent" );
798+
resultContent->setMinimumSize(350, WLength::Auto );
791799
collayout->addWidget( resultContent, 1, 0 );
792800
collayout->setRowStretch( 1, 1 );
793801
m_layout->addWidget( resCol, 0, 3 );

0 commit comments

Comments
 (0)