Changeset View
Changeset View
Standalone View
Standalone View
kded/output.cpp
Show First 20 Lines • Show All 353 Lines • ▼ Show 20 Line(s) | |||||
354 | bool Output::writeGlobalPart(const KScreen::OutputPtr &output, QVariantMap &info, | 354 | bool Output::writeGlobalPart(const KScreen::OutputPtr &output, QVariantMap &info, | ||
355 | const KScreen::OutputPtr &fallback) | 355 | const KScreen::OutputPtr &fallback) | ||
356 | { | 356 | { | ||
357 | 357 | | |||
358 | info[QStringLiteral("id")] = output->hash(); | 358 | info[QStringLiteral("id")] = output->hash(); | ||
359 | info[QStringLiteral("metadata")] = metadata(output); | 359 | info[QStringLiteral("metadata")] = metadata(output); | ||
360 | info[QStringLiteral("rotation")] = output->rotation(); | 360 | info[QStringLiteral("rotation")] = output->rotation(); | ||
361 | 361 | | |||
362 | // Round scale to one digit. | 362 | // Round scale to two digits | ||
363 | info[QStringLiteral("scale")] = int(output->scale() * 10 + 0.5) / 10.; | 363 | info[QStringLiteral("scale")] = int(output->scale() * 100 + 0.5) / 100.; | ||
364 | 364 | | |||
365 | QVariantMap modeInfo; | 365 | QVariantMap modeInfo; | ||
366 | float refreshRate = -1.; | 366 | float refreshRate = -1.; | ||
367 | QSize modeSize; | 367 | QSize modeSize; | ||
368 | if (output->currentMode() && output->isEnabled()) { | 368 | if (output->currentMode() && output->isEnabled()) { | ||
369 | refreshRate = output->currentMode()->refreshRate(); | 369 | refreshRate = output->currentMode()->refreshRate(); | ||
370 | modeSize = output->currentMode()->size(); | 370 | modeSize = output->currentMode()->size(); | ||
371 | } else if (fallback && fallback->currentMode()) { | 371 | } else if (fallback && fallback->currentMode()) { | ||
Show All 37 Lines |