moved progressbar into draw command
This commit is contained in:
parent
543ba0ec62
commit
71bc6e7f8b
|
@ -206,13 +206,6 @@ internal class AppNotify(override val notification: Notify): Canvas(), NotifyTyp
|
||||||
} catch (ignored2: Exception) {
|
} catch (ignored2: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the progress bar can change, so we always draw it every time
|
|
||||||
if (progress > 0 && prevProgress != progress) {
|
|
||||||
// draw the progress bar along the bottom
|
|
||||||
g.color = notification.theme.progress_FG
|
|
||||||
g.fillRect(0, Notify.HEIGHT - 2, progress, 2)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun draw(g: Graphics) {
|
private fun draw(g: Graphics) {
|
||||||
|
@ -225,6 +218,13 @@ internal class AppNotify(override val notification: Notify): Canvas(), NotifyTyp
|
||||||
g.drawImage(cachedClose, 0, 0, null)
|
g.drawImage(cachedClose, 0, 0, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the progress bar can change, so we always draw it every time
|
||||||
|
if (progress > 0 && prevProgress != progress) {
|
||||||
|
// draw the progress bar along the bottom
|
||||||
|
g.color = notification.theme.progress_FG
|
||||||
|
g.fillRect(0, Notify.HEIGHT - 2, progress, 2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onClick(x: Int, y: Int) {
|
fun onClick(x: Int, y: Int) {
|
||||||
|
|
|
@ -182,13 +182,6 @@ internal class DesktopNotify(override val notification: Notify) : JWindow(), Not
|
||||||
} catch (ignored2: Exception) {
|
} catch (ignored2: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the progress bar can change (only getting bigger!), so we always draw it when it grows
|
|
||||||
if (progress > 0 && prevProgress != progress) {
|
|
||||||
// draw the progress bar along the bottom
|
|
||||||
g.color = notification.theme.progress_FG
|
|
||||||
g.fillRect(0, Notify.HEIGHT - 2, progress, 2)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun draw(g: Graphics) {
|
private fun draw(g: Graphics) {
|
||||||
|
@ -201,6 +194,13 @@ internal class DesktopNotify(override val notification: Notify) : JWindow(), Not
|
||||||
g.drawImage(cachedClose, 0, 0, null)
|
g.drawImage(cachedClose, 0, 0, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the progress bar can change (only getting bigger!), so we always draw it when it grows
|
||||||
|
if (progress > 0 && prevProgress != progress) {
|
||||||
|
// draw the progress bar along the bottom
|
||||||
|
g.color = notification.theme.progress_FG
|
||||||
|
g.fillRect(0, Notify.HEIGHT - 2, progress, 2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onClick() {
|
fun onClick() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user