Skip to content

Commit

Permalink
Fixed|libappfw: Apply UI scale factor; non-integer numbers in Variabl…
Browse files Browse the repository at this point in the history
…eChoiceWidget
  • Loading branch information
skyjake committed Apr 5, 2016
1 parent 46c309a commit d97d851
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doomsday/sdk/libappfw/src/baseguiapp.cpp
Expand Up @@ -151,7 +151,7 @@ void BaseGuiApp::initSubsystems(SubsystemInitFlags flags)
}

// Apply the overall UI scale factor.
d->dpiFactor = config().getf("ui.scaleFactor", 1.f);
d->dpiFactor *= config().getf("ui.scaleFactor", 1.f);

scriptSystem().nativeModule("DisplayMode").set("DPI_FACTOR", d->dpiFactor);

Expand Down
4 changes: 2 additions & 2 deletions doomsday/sdk/libappfw/src/widgets/variablechoicewidget.cpp
Expand Up @@ -13,7 +13,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
* http://www.gnu.org/licenses</small>
* http://www.gnu.org/licenses</small>
*/

#include "de/VariableChoiceWidget"
Expand Down Expand Up @@ -58,7 +58,7 @@ DENG2_OBSERVES(Variable, Change )
if(!var) return;

var->audienceForChange() -= this;
var->set(NumberValue(self.selectedItem().data().toInt()));
var->set(NumberValue(self.selectedItem().data().toDouble()));
var->audienceForChange() += this;
}

Expand Down

0 comments on commit d97d851

Please sign in to comment.