Skip to content

Commit d834788

Browse files
committed
Fix welcome screen example spectra load button not showing, and fix peak CSV export button not going to right on iOS/Android.
1 parent d1d17fb commit d834788

File tree

3 files changed

+37
-20
lines changed

3 files changed

+37
-20
lines changed

InterSpec_resources/InterSpec.css

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -604,19 +604,29 @@ ul.Wt-popupmenu > li > a > span > span:hover
604604
margin-left: 5px;
605605
}
606606

607-
.SampleSpecLoadBtn
608-
{
609-
display: none;
607+
.SampleSpecRow {
608+
display: flex;
609+
justify-content: space-between;
610+
align-items: center;
610611
}
611612

612-
.Wt-selected > .SampleSpecRow > .SampleSpecLoadBtn
613-
{
614-
/* display: inline-block;
615-
margin: 0px auto; */
616-
display: inline;
617-
float: right;
613+
.SampleSpecLoadBtn {
614+
display: none;
618615
margin-right: 5px;
619-
margin-top: 4px; /* centers vertically; not a great solution since only works for 30px height rows, but works for now */
616+
}
617+
618+
.Wt-selected > .SampleSpecRow > .SampleSpecLoadBtn {
619+
display: block;
620+
}
621+
622+
@media (max-width: 350px) {
623+
.SampleSpecRow {
624+
font-size: small;
625+
}
626+
627+
.SampleSpecLoadBtn {
628+
font-size: small;
629+
}
620630
}
621631

622632

src/PeakInfoDisplay.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,19 +1079,22 @@ void PeakInfoDisplay::init()
10791079
}
10801080
}//for( int col = 0; col < m_model->columnCount(); ++col )
10811081

1082-
#if( !ANDROID && !IOS )
1082+
//#if( !ANDROID && !IOS )
1083+
WString hintTxt = "&nbsp;";
10831084
if( !m_viewer->isPhone() )
10841085
{
10851086
const char *key = m_viewer->isMobile() ? "pid-better-editor-hint-mobile" : "pid-better-editor-hint";
1086-
WText *txt = new WText( WString::tr(key), bottomDiv );
1087-
txt->addStyleClass( "PeakEditHint" );
1088-
const string show_js( "function(object, event){try{$('#" + txt->id() + "').css('visibility','visible');}catch(e){}}" );
1089-
const string hide_js( "function(object, event){try{$('#" + txt->id() + "').css('visibility','hidden');}catch(e){}}" );
1090-
mouseWentOver().connect( show_js );
1091-
mouseWentOut().connect( hide_js );
1092-
txt->doJavaScript( "(" + hide_js + ")();" );
1087+
hintTxt = WString::tr(key);
10931088
}
1094-
#endif
1089+
1090+
WText *txt = new WText( hintTxt, bottomDiv );
1091+
txt->addStyleClass( "PeakEditHint" );
1092+
const string show_js( "function(object, event){try{$('#" + txt->id() + "').css('visibility','visible');}catch(e){}}" );
1093+
const string hide_js( "function(object, event){try{$('#" + txt->id() + "').css('visibility','hidden');}catch(e){}}" );
1094+
mouseWentOver().connect( show_js );
1095+
mouseWentOut().connect( hide_js );
1096+
txt->doJavaScript( "(" + hide_js + ")();" );
1097+
//#endif
10951098

10961099
WContainerWidget *csvDiv = new WContainerWidget( bottomDiv );
10971100
csvDiv->addStyleClass( "PeakInfoDisplayCsvBtns" );

src/UseInfoWindow.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ UseInfoWindow::UseInfoWindow( std::function<void(bool)> showAgainCallback,
324324
m_tableSample->setRowHeight( WLength(30,WLength::Pixel) );
325325
m_tableSample->setColumnAlignment(0, Wt::AlignLeft);
326326
//m_tableSample->setHeaderAlignment(0, Wt::AlignCenter);
327-
m_tableSample->setColumnWidth(0,340);
327+
if( m_viewer->isPhone() )
328+
m_tableSample->setColumnWidth(0,240);
329+
else
330+
m_tableSample->setColumnWidth(0,340);
331+
328332
m_tableSample->hideColumn(1);
329333
m_tableSample->hideColumn(2);
330334

0 commit comments

Comments
 (0)