Skip to content

Commit f673550

Browse files
committed
Drop target should follow window size when you resize it to be taller
1 parent eb0157e commit f673550

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

src/renderer/index.html

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
<body>
1010
<main>
1111
<div class="pt-2">
12-
<div id='empty' class="empty mx-2">
13-
<div class="empty-icon">
14-
<i class="icon icon-photo icon-3x"></i>
12+
<div id='empty' class="empty">
13+
<div class="empty-inner">
14+
<div class="empty-icon">
15+
<i class="icon icon-photo icon-3x"></i>
16+
</div>
17+
<p class="empty-title h5">No images selected</p>
18+
<p class="empty-subtitle">Drag and drop files here for processing.</p>
19+
<div class="empty-action"></div>
1520
</div>
16-
<p class="empty-title h5">No images selected</p>
17-
<p class="empty-subtitle">Drag and drop files here for processing.</p>
18-
<div class="empty-action"></div>
1921
</div>
2022

2123
<table id="file-list" class="table table-striped table-hover d-none">

src/styles/empty.scss

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
11
.empty {
2+
// border in day mode
23
border: 1px dashed #3b4351;
4+
5+
display: block;
6+
height: calc(100% - 14px);
7+
position: absolute;
8+
top: 0;
9+
left: 0;
10+
right: 0;
11+
bottom: 0;
12+
margin-top: 6px;
13+
margin-left: 8px;
14+
margin-right: 8px;
15+
margin-bottom: 6px;
16+
padding: 0;
17+
18+
.empty-inner {
19+
position: absolute;
20+
21+
// position the top+left edges of the element
22+
// at the middle of the parent
23+
top: 50%;
24+
left: 50%;
25+
26+
// This is a shorthand of translateX(-50%) and translateY(-50%)
27+
transform: translate(-50%, -50%);
28+
}
329
}

0 commit comments

Comments
 (0)