Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nils Vreman
ScheduLearn
Commits
be339d1d
Commit
be339d1d
authored
Nov 09, 2018
by
Nils Vreman
Browse files
Fixed offset error
parent
a09e0786
Changes
1
Hide whitespace changes
Inline
Side-by-side
gui/tasksetgui/TasksetDisplay.java
View file @
be339d1d
...
...
@@ -59,9 +59,15 @@ public class TasksetDisplay extends BoxPanel implements Observer, UpdateListener
revalidate
();
}
// Add empty if exists
if
(
empty
.
isPresent
())
{
add
(
empty
.
get
());
revalidate
();
}
// This section fixes the offset from
// the lowest priority task to the Southern border.
int
taskOffset
=
priorities
.
size
()*
35
;
int
taskOffset
=
(
empty
.
isPresent
())
?
(
priorities
.
size
()
+
1
)*
35
:
priorities
.
size
()*
35
;
if
(
offset
-
taskOffset
>
0
)
{
setMaximumSize
(
new
Dimension
(
300
,
35
+
taskOffset
));
add
(
createVerticalStrut
(
offset
-
taskOffset
));
...
...
@@ -70,12 +76,6 @@ public class TasksetDisplay extends BoxPanel implements Observer, UpdateListener
// Mark the previously marked one.
marked
.
ifPresent
(
taskGrid
->
taskGrid
.
mark
());
// Add empty if exists
if
(
empty
.
isPresent
())
{
add
(
empty
.
get
());
revalidate
();
}
}
/*
...
...
@@ -128,8 +128,7 @@ public class TasksetDisplay extends BoxPanel implements Observer, UpdateListener
emptyGrid
.
addEmptyListener
(
this
);
empty
=
Optional
.
of
(
emptyGrid
);
add
(
emptyGrid
);
revalidate
();
update
(
taskset
,
null
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment