Change aspect ratio of MFC HD model thumbs to 16:9

This commit is contained in:
0xb00bface 2020-09-26 22:11:59 +02:00
parent 6e63fae244
commit 413afa1a65
3 changed files with 11 additions and 0 deletions

View File

@ -37,6 +37,7 @@ public class MyFreeCamsTabProvider extends TabProvider {
updateService = new HDCamsUpdateService();
ThumbOverviewTab hd = new ThumbOverviewTab("HD", updateService, myFreeCams);
hd.setRecorder(recorder);
//hd.setImageAspectRatio(9.0 / 16.0);
tabs.add(hd);
updateService = new PopularModelService();

View File

@ -654,4 +654,8 @@ public class ThumbCell extends StackPane {
public void releaseResources() {
iv.setImage(null);
}
public void setImageAspectRatio(double imageAspectRatio) {
this.imgAspectRatio = imageAspectRatio;
}
}

View File

@ -116,6 +116,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
Task<List<Model>> searchTask;
SearchPopover popover;
SearchPopoverTreeList popoverTreelist = new SearchPopoverTreeList();
double imageAspectRatio = 3.0 / 4.0;
private ComboBox<Integer> thumbWidth;
@ -378,6 +379,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
if(!found) {
ThumbCell newCell = createThumbCell(model, recorder);
newCell.setIndex(index);
newCell.setImageAspectRatio(imageAspectRatio);
positionChangedOrNew.add(newCell);
}
index++;
@ -903,4 +905,8 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
return t;
};
}
public void setImageAspectRatio(double imageAspectRatio) {
this.imageAspectRatio = imageAspectRatio;
}
}