<p><strong>Problem:</strong> When launching Bisq on my Windows 10 laptop, the application window is larger than the usable screen bounds causing the title bar of the application to be mostly off the screen. This is an annoyance and requires me to move and resize the window so that it is within the screen bounds.</p>
<p><strong>Cause:</strong> My laptop has a 13-inch 1920x1080 display and uses 150% display scaling. As a result, it has a usable resolution (maximum screen bounds) of 1280x660 (accounting for the height of the Windows task bar). When launching the application, it sets the initial window height to 710px, which exceeds my usable screen height.</p>
<p><strong>Fix:</strong> When launching the application, prevent the initial window size from exceeding the maximum available bounds. These bounds account for objects in the native windowing system such as task bars and menu bars.</p>
<p><strong>Note: This is a work in progress as I have yet to test it on anything other than Windows (I plan to verify against Ubuntu). Nor have I verified a multi-display setup. But I still wanted to put this PR together in case anyone is able to verify it especially on Mac which I do not have available to test.</strong></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/1945'>https://github.com/bisq-network/bisq/pull/1945</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Limit initial window size on application launch</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/1945/files#diff-0">desktop/src/main/java/bisq/desktop/app/BisqApp.java</a>
    (22)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/1945/files#diff-1">desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/1945/files#diff-2">desktop/src/main/java/bisq/desktop/util/Layout.java</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/1945.patch'>https://github.com/bisq-network/bisq/pull/1945.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/1945.diff'>https://github.com/bisq-network/bisq/pull/1945.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/1945">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZtur-K8Jn9ffJ2BcHUg53HpNJM-o8ks5uxQXtgaJpZM4Ysk4o">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtjnEdAb7ZEEbv-XxjF5SVoLqKxVuks5uxQXtgaJpZM4Ysk4o.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq","title":"bisq-network/bisq","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"[WIP] Limit initial window size on application launch (#1945)"}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq/pull/1945"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/1945",
"url": "https://github.com/bisq-network/bisq/pull/1945",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "[WIP] Limit initial window size on application launch (#1945)",
"sections": [
{
"text": "",
"activityTitle": "**Devin Bileck**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@devinbileck",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "27c41a0",
"value": "Limit initial window size on application launch"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[desktop/src/main/java/bisq/desktop/app/BisqApp.java](https://github.com/bisq-network/bisq/pull/1945/files#diff-0) (22 changes)"
},
{
"name": "Modified",
"value": "[desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java](https://github.com/bisq-network/bisq/pull/1945/files#diff-1) (4 changes)"
},
{
"name": "Modified",
"value": "[desktop/src/main/java/bisq/desktop/util/Layout.java](https://github.com/bisq-network/bisq/pull/1945/files#diff-2) (6 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"bisq-network/bisq\",\n\"issueId\": 1945,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"bisq-network/bisq\",\n\"pullRequestId\": 1945\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1945"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1945.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1945.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 414338600\n}"
}
],
"themeColor": "26292E"
}
]</script>