mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
Restore comments, remove the black spacer bar on platforms where it is not required
This commit is contained in:
parent
413601d0e5
commit
de5cbda4f9
2 changed files with 10 additions and 5 deletions
|
|
@ -66,7 +66,7 @@ class plugin : Plugin() {
|
|||
@Exposed(description = "Start minimized/collapsed by default")
|
||||
var launchMinimized = false
|
||||
|
||||
private const val FIXED_WIDTH = 782
|
||||
private const val FIXED_WIDTH = 765
|
||||
private const val NAVBAR_WIDTH = 30
|
||||
private const val MAIN_CONTENT_WIDTH = 242
|
||||
private const val WRENCH_ICON = 907
|
||||
|
|
@ -118,16 +118,19 @@ class plugin : Plugin() {
|
|||
private fun UpdateDisplaySettings() {
|
||||
val mode = GetWindowMode()
|
||||
val currentScrollPaneWidth = if (mainContentPanel.isVisible) NAVBAR_WIDTH + MAIN_CONTENT_WIDTH else NAVBAR_WIDTH
|
||||
val osName = System.getProperty("os.name").toLowerCase()
|
||||
val offset = if (osName == "win") 16 else 0
|
||||
when (mode) {
|
||||
WindowMode.FIXED -> {
|
||||
if (frame.width < FIXED_WIDTH + currentScrollPaneWidth) {
|
||||
frame.setSize(FIXED_WIDTH + currentScrollPaneWidth, frame.height)
|
||||
if (frame.width < FIXED_WIDTH + currentScrollPaneWidth + offset) {
|
||||
frame.setSize(FIXED_WIDTH + currentScrollPaneWidth + offset, frame.height)
|
||||
}
|
||||
val difference = frame.width - (FIXED_WIDTH + currentScrollPaneWidth)
|
||||
|
||||
val difference = frame.width - (FIXED_WIDTH + offset + currentScrollPaneWidth)
|
||||
GameShell.leftMargin = difference / 2
|
||||
}
|
||||
WindowMode.RESIZABLE -> {
|
||||
GameShell.canvasWidth = frame.width - (currentScrollPaneWidth + 16)
|
||||
GameShell.canvasWidth = frame.width - (currentScrollPaneWidth + offset)
|
||||
}
|
||||
}
|
||||
rightPanelWrapper?.preferredSize = Dimension(currentScrollPaneWidth, frame.height)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue