Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating WebUI in Remote Control plug-in #3929

Merged
merged 5 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions guide/app_config_ini.tex
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,8 @@ \subsection{\big[navigation\big]}
To look Northwest and up at $45\degree$, use \emph{-1,-1,1} and so on.\\%\midrule
auto\_move\_duration & float & Duration (seconds) for the program to move to point at an object when the space bar is pressed.
Typical value: \emph{1.4}\\%\midrule
return\_home\_duration & float & Duration (seconds) of movement of returning to a home location (for a demo). Default value: \emph{0.}\\%\midrule
return\_fov\_duration & float & Duration (seconds) of zooming to an initial field of view value (for a demo). Default value: \emph{1.}\\%\midrule
mouse\_zoom & float & Sets the mouse zoom amount (mouse-wheel)\\%\midrule
move\_speed & float & Sets the speed of movement\\%\midrule
zoom\_speed & float & Sets the zoom speed\\%\midrule
Expand Down
Binary file modified plugins/RemoteControl/webroot/images/icons-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/RemoteControl/webroot/images/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 52 additions & 37 deletions plugins/RemoteControl/webroot/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions plugins/RemoteControl/webroot/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
url('dejavusans-webfont.svg#dejavu_sansbook') format('svg');
font-weight: normal;
font-style: normal;

}

@font-face {
Expand Down Expand Up @@ -85,7 +84,7 @@ div#srch_tab_object {
color: rgb(3,3,3);
background: linear-gradient(rgb(86, 87, 90),rgb(48, 49, 52));
border-width: 0;
border-radius: 0;
border-radius: 0;
}

/* Large vertical spinners */
Expand Down Expand Up @@ -576,6 +575,7 @@ button.button32:active {
.icon32.btConstellationLabels { background-position: -148px 0; }
.icon32.btConstellationLines { background-position: -185px 0; }
.icon32.btConstellationBoundaries { background-position: -885px 0; }
.icon32.btGotoHome { background-position: -922px 0; }
.icon32.btDSS { background-position: -222px 0; }
.icon32.btFlipHorizontal { background-position: -259px 0; }
.icon32.btEquatorialGrid { background-position: -296px 0; }
Expand Down
21 changes: 12 additions & 9 deletions plugins/RemoteControl/webroot/tablet7in.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,17 @@ <h3><input type="checkbox" class="stelaction" name="actionShow_Planets" /><?= tr
<h3><label><input type="checkbox" class="stelaction valign-middle" name="actionShow_Atmosphere"/><?= tr("Atmosphere")?></label></h3>
<label><input type="checkbox" class="stelaction" name="actionShow_LightPollutionFromDatabase" /><?= tr("Light pollution data from locations database")?></label>
<div class="table">

<p><div class="flex flex-baseline">
<label><?= tr("Light pollution:")?></label><span class="stelproperty" data-prop="StelSkyDrawer.bortleScaleIndex"></span>
<div class="slider stelproperty flex-expand" data-prop="StelSkyDrawer.bortleScaleIndex" data-min="1" data-max="9" data-step="1"></div>
</div>
</p>


<!--p><label for="atmosphere_bortlescaleindex"><?= tr("Light pollution:")?></label><input id="atmosphere_bortlescaleindex" class="spinner stelproperty" name="StelSkyDrawer.bortleScaleIndex" data-min="1" data-max="9" data-step="1" data-numberformat="n0" readonly="readonly"/></p-->
<label><?= tr("Bortle class:")?>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(1)" title='<?= tr("excellent dark-sky site")?>'>1</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(2)" title='<?= tr("typical truly dark site")?>'>2</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(3)" title='<?= tr("rural sky")?>'>3</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(4)" title='<?= tr("rural/suburban transition")?>'>4</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(5)" title='<?= tr("suburban sky")?>'>5</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(6)" title='<?= tr("bright suburban sky")?>'>6</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(7)" title='<?= tr("suburban/urban transition")?>'>7</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(8)" title='<?= tr("city sky")?>'>8</button>
<button type="button" class="stelssc" value="core.setBortleScaleIndex(9)" title='<?= tr("inner-city sky")?>'>9</button>
</label>
</div>
<div id="vo_refraction" class="innerblock">
<h3><?= tr("Refraction Settings")?></h3>
Expand Down Expand Up @@ -939,6 +941,7 @@ <h3><?= tr("Scene selection")?></h3>
<li title="<?= tr("Center on selected object")?>"><button class="stelaction icon32 btGotoSelectedObject" name="actionSet_Tracking"></button></li>
<li title="<?= tr("Night mode")?>"><button class="stelaction icon32 btNightView" name="actionShow_Night_Mode"></button></li>
<li title="<?= tr("Full-screen mode")?>"><button class="stelaction icon32 btFullScreen" name="actionSet_Full_Screen_Global"></button></li>
<li title="<?= tr("Go to home")?>"><button class="stelaction icon32 btGotoHome" name="actionGo_Home_Global"></button></li>
</ul>
</div>
<!-- handled by mainui.js -->
Expand Down
6 changes: 3 additions & 3 deletions src/core/StelCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,7 @@ void StelCore::returnToHome()
// between planets using SpaceShip and second method give does not exist data
StelLocationMgr& locationMgr = StelApp::getInstance().getLocationMgr();
StelLocation loc;
QSettings* conf = StelApp::getInstance().getSettings();
if (defaultLocationID == "auto")
{
locationMgr.locationFromIP();
Expand All @@ -1139,10 +1140,9 @@ void StelCore::returnToHome()
loc = locationMgr.locationForString(defaultLocationID);

if (loc.isValid())
moveObserverTo(loc, 0.);
moveObserverTo(loc, conf->value("navigation/return_home_duration", 0.).toDouble()); // ability set a duration of movement (for a demo)

PlanetP p = GETSTELMODULE(SolarSystem)->searchByEnglishName(loc.planetName);
QSettings* conf = StelApp::getInstance().getSettings();

LandscapeMgr* landscapeMgr = GETSTELMODULE(LandscapeMgr);
landscapeMgr->setCurrentLandscapeID(landscapeMgr->getDefaultLandscapeID());
Expand All @@ -1154,7 +1154,7 @@ void StelCore::returnToHome()

StelMovementMgr* smmgr = getMovementMgr();
smmgr->setViewDirectionJ2000(altAzToJ2000(smmgr->getInitViewingDirection(), StelCore::RefractionOff));
smmgr->zoomTo(smmgr->getInitFov(), 1.);
smmgr->zoomTo(smmgr->getInitFov(), conf->value("navigation/return_fov_duration", 1.).toDouble()); // ability set a duration of zooming (for a demo)
}

double StelCore::getJDOfLastJDUpdate() const
Expand Down
2 changes: 1 addition & 1 deletion src/core/modules/SolarSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4191,7 +4191,7 @@ void SolarSystem::setExtraThreads(int n)

void SolarSystem::setMarkerMagThreshold(double m)
{
markerMagThreshold=qBound(-2.,m,37.);
markerMagThreshold=qBound(-5.,m,37.); // sync with GUI & WUI!
StelApp::immediateSave("astro/planet_markers_mag_threshold", markerMagThreshold);
emit markerMagThresholdChanged(markerMagThreshold);
}
2 changes: 1 addition & 1 deletion src/gui/viewDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@
<double>-5.000000000000000</double>
</property>
<property name="maximum">
<double>25.000000000000000</double>
<double>37.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
Expand Down
Loading