Skip to content

Commit d58edb9

Browse files
committed
Fix up some styling issue type things.
Also fix crash when hiding, then showing tool tabs. Small cleanups.
1 parent 5f0c75b commit d58edb9

File tree

8 files changed

+76
-117
lines changed

8 files changed

+76
-117
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# excpet iOS, Android, and Electron, InterSpecExe
33

44
cmake_policy(SET CMP0048 NEW)
5-
project(InterSpec VERSION 1.0.7)
5+
project(InterSpec VERSION 1.0.8)
66

77
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
88
set(CMAKE_COLOR_MAKEFILE ON CACHE BOOL "Color" FORCE)
@@ -1035,7 +1035,7 @@ elseif(BUILD_AS_OSX_APP)
10351035

10361036
#set MACOS_BUNDLE_VERSION_NUMBER for Info.plist.template to populate cooresponding value in Xcode
10371037
#math(EXPR MACOS_BUNDLE_VERSION_NUMBER "100*(${PROJECT_VERSION_MAJOR}-1) + 10*${PROJECT_VERSION_MINOR} + ${PROJECT_VERSION_PATCH}" )
1038-
set(MACOS_BUNDLE_VERSION_NUMBER 8)
1038+
set(MACOS_BUNDLE_VERSION_NUMBER 9)
10391039

10401040
set_target_properties(
10411041
InterSpecExe

InterSpec/InterSpec.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,6 @@ class InterSpec : public Wt::WContainerWidget
577577

578578
void setToolTabsVisible( bool show );
579579
bool toolTabsVisible() const;
580-
581-
void setChartSpacing();
582580

583581
void showMakeDrfWindow();
584582
void showDetectorEditWindow();
@@ -1196,7 +1194,7 @@ class InterSpec : public Wt::WContainerWidget
11961194
Wt::WGridLayout *m_layout;
11971195

11981196
Wt::WContainerWidget *m_charts;
1199-
Wt::WContainerWidget *m_chartsResize;
1197+
Wt::WContainerWidget *m_chartResizer;
12001198
Wt::WGridLayout *m_toolsLayout;
12011199
#endif
12021200

InterSpec/SpectrumDataModel.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ class SpectrumDataModel: public Wt::WAbstractItemModel
8080

8181
//setDataHistogram(): also sets m_secondSF and m_backgroundSF to
8282
// m_dataLiveTime/m_{Second|Background}LiveTime
83-
virtual void setDataHistogram( std::shared_ptr<SpecUtils::Measurement> hist );
83+
void setDataHistogram( std::shared_ptr<SpecUtils::Measurement> hist );
8484

8585
//setSecondDataHistogram(): also sets m_secondSF to m_dataLiveTime/m_secondDataLiveTime
86-
virtual void setSecondDataHistogram( std::shared_ptr<SpecUtils::Measurement> hist,
86+
void setSecondDataHistogram( std::shared_ptr<SpecUtils::Measurement> hist,
8787
const bool ownAxis );
8888

8989
//setBackgroundHistogram(): also sets m_backgroundSF to
9090
// m_dataLiveTime/m_backgroundLiveTime
91-
virtual void setBackgroundHistogram( std::shared_ptr<SpecUtils::Measurement> hist );
91+
void setBackgroundHistogram( std::shared_ptr<SpecUtils::Measurement> hist );
9292

9393
// Flags for whether the background are getting subtracted.
9494
void setBackgroundSubtract( const bool subtract = true );
@@ -98,28 +98,28 @@ class SpectrumDataModel: public Wt::WAbstractItemModel
9898

9999
// The following functions will return an empty std::shared_ptr<SpecUtils::Measurement> if the data histogram
100100
// was not previously set.
101-
virtual std::shared_ptr<SpecUtils::Measurement> getData();
102-
virtual std::shared_ptr<SpecUtils::Measurement> getSecondData();
103-
virtual std::shared_ptr<SpecUtils::Measurement> getBackground();
101+
std::shared_ptr<SpecUtils::Measurement> getData();
102+
std::shared_ptr<SpecUtils::Measurement> getSecondData();
103+
std::shared_ptr<SpecUtils::Measurement> getBackground();
104104

105-
virtual std::shared_ptr<const SpecUtils::Measurement> getData() const;
106-
virtual std::shared_ptr<const SpecUtils::Measurement> getSecondData() const;
107-
virtual std::shared_ptr<const SpecUtils::Measurement> getBackground() const;
105+
std::shared_ptr<const SpecUtils::Measurement> getData() const;
106+
std::shared_ptr<const SpecUtils::Measurement> getSecondData() const;
107+
std::shared_ptr<const SpecUtils::Measurement> getBackground() const;
108108

109-
virtual float dataRealTime() const;
110-
virtual float dataLiveTime() const;
111-
virtual float dataNeutronCounts() const;
109+
float dataRealTime() const;
110+
float dataLiveTime() const;
111+
float dataNeutronCounts() const;
112112

113-
virtual float secondDataRealTime() const;
114-
virtual float secondDataLiveTime() const;
115-
virtual float secondDataNeutronCounts() const; //actual measurment, NOT scaled by secondDataScaledBy();
113+
float secondDataRealTime() const;
114+
float secondDataLiveTime() const;
115+
float secondDataNeutronCounts() const; //actual measurment, NOT scaled by secondDataScaledBy();
116116

117-
virtual float backgroundRealTime() const;
118-
virtual float backgroundLiveTime() const;
119-
virtual float backgroundNeutronCounts() const; //actual measurment, NOT scaled by backgroundScaledBy();
117+
float backgroundRealTime() const;
118+
float backgroundLiveTime() const;
119+
float backgroundNeutronCounts() const; //actual measurment, NOT scaled by backgroundScaledBy();
120120

121-
virtual float secondDataScaledBy() const; //returns m_secondSF
122-
virtual float backgroundScaledBy() const; //returns m_backgroundSF
121+
float secondDataScaledBy() const; //returns m_secondSF
122+
float backgroundScaledBy() const; //returns m_backgroundSF
123123

124124
//Scale factors set in setSecondDataScaleFactor() and
125125
// setBackgroundDataScaleFactor() multiply the live time scale factor.
@@ -152,7 +152,7 @@ class SpectrumDataModel: public Wt::WAbstractItemModel
152152
void setSecondarySpectrumColor( const Wt::WColor &color );
153153

154154
std::vector< Wt::Chart::WDataSeries > suggestDataSeries() const;
155-
virtual bool secondDataOwnAxis() const;
155+
bool secondDataOwnAxis() const;
156156

157157
// Find which histogram is defining the x-axis by moving through priorities.
158158
std::shared_ptr<SpecUtils::Measurement> histUsedForXAxis();
@@ -189,8 +189,8 @@ class SpectrumDataModel: public Wt::WAbstractItemModel
189189

190190
void addIntegralOfHistogramToLegend( const bool doIt = true );
191191

192-
virtual int rebinFactor() const;
193-
virtual void setRebinFactor( const int factor );
192+
int rebinFactor() const;
193+
void setRebinFactor( const int factor );
194194

195195
// Checks for whether a given column is actually populated.
196196
bool columnHasData( int column ) const;

InterSpec_resources/AppHtmlMenu.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,9 @@
218218
opacity: .4;
219219
}
220220

221+
/* When the app is not the forground app, change title bar color a little to indicate this */
221222
.app-titlebar.inactive, .app-titlebar.inactive button {
222223
/* For non-dark-mode. */
223224
background-color: rgb(250, 250, 250) !important;
224-
225-
/* For dark-mode. */
226-
/* background-color: rgb(50,50,51) !important; */
227225
}
228226

InterSpec_resources/static_text/color_theme_dialog_help.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This tool allows you to customize colors on the spectrum and time charts, as wel
3838

3939

4040
<div style="width: 100%">
41-
<img align="left" src="InterSpec_resources/static_text/images/color_theme_dialog_reflines.png" class="imageBorder" style="width:55%; margin-top: 10px; "/>
41+
<img align="left" src="InterSpec_resources/static_text/images/color_theme_dialog_reflines.svg" class="imageBorder" style="width:55%; margin-top: 10px; "/>
4242

4343
<span style="float:right; width: 44%">
4444
<ul>

InterSpec_resources/themes/dark/dark.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,8 @@ ul.HeavyNavMenu > li.item:hover {
262262
.app-titlebar .window-controls-container .window-icon-bg .window-icon:hover {
263263
background-color: rgb(175,175,175) !important;
264264
}
265+
266+
/* When the app is not the forground app, change title bar color a little to indicate this */
267+
.app-titlebar.inactive, .app-titlebar.inactive button {
268+
background-color: rgb(50,50,51) !important;
269+
}

js/AppHtmlMenu.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ function(maximized){
88
$('.resizer.top,.resizer.left').show();
99
$('.window-max-restore').removeClass('window-unmaximize').addClass('window-maximize');
1010
}
11+
12+
let f = function(){ window.dispatchEvent(new Event('resize')); };
13+
setTimeout( f, 100 );
14+
setTimeout( f, 500 );
1115
}
1216
);
1317

0 commit comments

Comments
 (0)