forked from j62/ctbrec
1
0
Fork 0

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(); updateService = new HDCamsUpdateService();
ThumbOverviewTab hd = new ThumbOverviewTab("HD", updateService, myFreeCams); ThumbOverviewTab hd = new ThumbOverviewTab("HD", updateService, myFreeCams);
hd.setRecorder(recorder); hd.setRecorder(recorder);
//hd.setImageAspectRatio(9.0 / 16.0);
tabs.add(hd); tabs.add(hd);
updateService = new PopularModelService(); updateService = new PopularModelService();

View File

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