Skip to content

Commit

Permalink
Optimize padding
Browse files Browse the repository at this point in the history
  • Loading branch information
andan67 committed Jan 16, 2022
1 parent 5905d39 commit ab146b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion connectiq/source-fr55/TrackView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class TrackView extends TrackViewCommon {
function initialize() {
TrackViewCommon.initialize();
fontsize = Graphics.FONT_XTINY;
paddingEnabled = true;
padding = 0.6 * Graphics.getFontAscent(fontsize);
}
}
2 changes: 1 addition & 1 deletion connectiq/source-round/TrackView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class TrackView extends TrackViewCommon {
function initialize() {
TrackViewCommon.initialize();
fontsize = Graphics.FONT_XTINY;
paddingEnabled = true;
padding = Graphics.getFontAscent(fontsize);
}
}
6 changes: 0 additions & 6 deletions connectiq/source/TrackViewCommon.mc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ class TrackViewCommon extends GenericView {
var fontsize = Graphics.FONT_MEDIUM;
var fontHeight = 0;
var fontsizeNumber = Graphics.FONT_LARGE;

var paddingEnabled = false;
var padding = 0.0;

var showElevationPlot = false;
Expand Down Expand Up @@ -414,10 +412,6 @@ class TrackViewCommon extends GenericView {
y2Ele = pixelHeight2 + 0.6 * eleHeight;

fontHeight = dc.getFontHeight(fontsize);

if(paddingEnabled) {
padding = dc.getFontAscent(fontsize);
}
}

// Called when this View is brought to the foreground. Restore
Expand Down

0 comments on commit ab146b4

Please # to comment.