Skip to content
Merged
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
4 changes: 2 additions & 2 deletions widget/source/Entities/EntityListView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class EntityListView extends Ui.View {
// Adjust text position for rectangular screens
if (Utils.isRectangularScreen()) {
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
dc.drawText(vh * 0.65, cvw, font, text, Graphics.TEXT_JUSTIFY_CENTER);
dc.drawText(cvw, vh * 0.4, font, text, Graphics.TEXT_JUSTIFY_CENTER);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the docs, the width is the first argument, not the height, which was causing some trouble (see screenshots i added to the PR)

} else {
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK);
dc.drawText(cvh, cvw, font, text, Graphics.TEXT_JUSTIFY_CENTER);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to touch this one because I assumed you tested on non-rectangular devices, but it should probably be fixed too as the arguments are passed the wrong way around

Expand Down Expand Up @@ -212,7 +212,7 @@ class EntityListView extends Ui.View {

// Adjust text position for rectangular screens
if (Utils.isRectangularScreen()) {
dc.drawText(cvh, cvw, font, text, Graphics.TEXT_JUSTIFY_CENTER);
dc.drawText( cvw, cvh, font, text, Graphics.TEXT_JUSTIFY_CENTER);
} else {
dc.drawText(cvh, cvw * 1.1, font, text, Graphics.TEXT_JUSTIFY_CENTER);
}
Expand Down