| Summary: | "%" in "Scale Layer to new Size" indicates an unexpected value | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | fsqrt <fsqrt> |
| Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | normal | CC: | dimula73 |
| Priority: | NOR | ||
| Version First Reported In: | 4.4.1 | ||
| Target Milestone: | --- | ||
| Platform: | Appimage | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
fsqrt
2020-11-08 03:43:22 UTC
Hi, fsqrt! To scale relative to image size you should use "vw" and "vh" units. Percentage is always relative to the current size of the layer. Thank you for your comment.
I know developers are very busy, but I would appreciate it if you could go over the report again.
I am not asking how to scale the layers
Yes, users will think as you said, Percentage is always relative to the current size of the layer (as well as Transform tool). but it isn't.
If we select the unit in '(QComboBox*)WdgLayerSize::newWidthUnit/newHeightUnit', end up with 'KisDocumentAwareSpinBoxUnitManager::getConversionFactor()'.
qreal KisDocumentAwareSpinBoxUnitManager::getConversionFactor(int dim, QString psymbol) const
{
QString symbol = psymbol;
if (symbol == "%") { //percent can be seen as vw or vh depending of the reference side in the image.
if (pixDir == PIX_DIR_X) {
symbol = "vw";
} else {
symbol = "vh";
}
}
...
Unit symbol "%" will override "vw"/"vh". "vw"/"vh" refers to image size, not layer. I think this is bug.
- Unit symbol "%" will override "vw"/"vh". + Unit symbol "%" will be overwritten by "vw"/"vh". |