Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ All notable changes to MapHide are documented here.
or shut down while MapHide was running.
- Added an installer, which adds MapHide to the Start menu and to Installed
apps in Windows. Uninstalling asks whether to keep your settings.
- Added a Check for updates button under About in Settings. When a new
version is out, Update installs it and reopens MapHide with your settings
kept.
- Added a Check for updates switch under Behavior in Settings, on by default,
which looks for a new version when MapHide opens. The field log says when
one is out.

## v0.2.6 - 2026-10-27

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ This is normal behavior. MapHide hides to the system tray instead of fully closi

## Version

The latest release and its download are on the [Releases page](https://github.com/ColorDumper/MapHide/releases/latest). To update, run the newer setup file; your settings are kept. To remove MapHide, use **Settings > Apps > Installed apps** in Windows, where you can choose whether to keep your settings. What changed in each version is in the [changelog](CHANGELOG.md).
The latest release and its download are on the [Releases page](https://github.com/ColorDumper/MapHide/releases/latest). MapHide checks for a new version each time it opens (you can turn this off under `BEHAVIOR` in `SETTINGS`). When one is out, click `UPDATE` under `ABOUT`: MapHide closes, updates and opens again, and your settings are kept. You can also run the newer setup file yourself. To remove MapHide, use **Settings > Apps > Installed apps** in Windows, where you can choose whether to keep your settings. What changed in each version is in the [changelog](CHANGELOG.md).

## Credits

Expand Down
3 changes: 2 additions & 1 deletion config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"hide_hotkey": "H",
"hide_delay_ms": 120,
"log_enabled": false,
"theme": "field"
"theme": "field",
"check_updates": true
}
7 changes: 7 additions & 0 deletions installer/MapHide.iss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Name: "{autodesktop}\MapHide"; Filename: "{app}\MapHide.exe"; AppUserModelID: "{

[Run]
Filename: "{app}\MapHide.exe"; Description: "{cm:LaunchProgram,MapHide}"; Flags: nowait postinstall skipifsilent
; MapHide's own updater runs this setup with /RELAUNCH=1 to open it again after.
Filename: "{app}\MapHide.exe"; Flags: nowait; Check: RelaunchRequested

[UninstallDelete]
Type: filesandordirs; Name: "{app}\_internal"
Expand All @@ -83,6 +85,11 @@ Type: filesandordirs; Name: "{app}\_internal"
var
RemoveSettings: Boolean;

function RelaunchRequested(): Boolean;
begin
Result := ExpandConstant('{param:RELAUNCH|0}') = '1';
end;

// Close a running MapHide the same way Exit in the tray does, so the overlay
// is hidden in OBS before its files are replaced or removed.
procedure QuitMapHide(const ExePath: String);
Expand Down
7 changes: 6 additions & 1 deletion maphide/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
MAX_PORT = 65535
# Settings only the window uses. Changing these never needs the worker
# restarted, so saving them leaves the OBS connection and the overlay alone.
WINDOW_ONLY_FIELDS = frozenset({"auto_connect", "theme"})
WINDOW_ONLY_FIELDS = frozenset({"auto_connect", "theme", "check_updates"})


def clamp(value, low, high):
Expand Down Expand Up @@ -58,6 +58,7 @@ class AppConfig:
hide_delay_ms: int = DEFAULT_HIDE_DELAY_MS
log_enabled: bool = False
theme: str = DEFAULT_THEME
check_updates: bool = True

@classmethod
def from_dict(cls, data):
Expand Down Expand Up @@ -95,6 +96,7 @@ def from_dict(cls, data):
),
log_enabled=_flag(data, "log_enabled", False),
theme=theme_name(data.get("theme") or DEFAULT_THEME),
check_updates=_flag(data, "check_updates", True),
)

def to_dict(self):
Expand All @@ -111,6 +113,7 @@ def to_dict(self):
"hide_delay_ms": self.hide_delay_ms,
"log_enabled": self.log_enabled,
"theme": self.theme,
"check_updates": self.check_updates,
}

def to_loggable_dict(self):
Expand Down Expand Up @@ -196,6 +199,7 @@ def config_from_form(
auto_reconnect,
log_enabled,
theme=DEFAULT_THEME,
check_updates=True,
):
"""Build an AppConfig from what a settings form holds, as typed.

Expand Down Expand Up @@ -227,6 +231,7 @@ def config_from_form(
hide_delay_ms=clamp_hide_delay(hide_delay_ms),
log_enabled=bool(log_enabled),
theme=theme_name(theme),
check_updates=bool(check_updates),
)


Expand Down
2 changes: 2 additions & 0 deletions maphide/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
# EVENT_* codes.
HISTORY_SETTINGS_SAVED = "settings_saved"
HISTORY_DEFAULTS_RESTORED = "defaults_restored"
# A newer MapHide is out; `subject` is its version.
HISTORY_UPDATE_AVAILABLE = "update_available"
# A message the window itself puts in the history, such as a setting it
# can't use.
HISTORY_NOTICE = "notice"
Expand Down
9 changes: 8 additions & 1 deletion maphide/fieldlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

from dataclasses import dataclass

from .controller import HISTORY_DEFAULTS_RESTORED, HISTORY_NOTICE, HISTORY_SETTINGS_SAVED
from .controller import (
HISTORY_DEFAULTS_RESTORED,
HISTORY_NOTICE,
HISTORY_SETTINGS_SAVED,
HISTORY_UPDATE_AVAILABLE,
)
from .obs import OBS_BAD_PASSWORD, OBS_LINK_LOST, OBS_OVERLAY_MAY_REMAIN, OBS_UNREACHABLE
from .overlay import (
EVENT_CONNECT_FAILED,
Expand Down Expand Up @@ -91,6 +96,8 @@ def _wording(entry):
return "> settings saved", PLAIN
if code == HISTORY_DEFAULTS_RESTORED:
return "> defaults restored", PLAIN
if code == HISTORY_UPDATE_AVAILABLE and entry.subject:
return f"> update available · v{entry.subject} · see settings", LINKED
if code == HISTORY_NOTICE:
return f"> {entry.message}", WARNING
return f"> {entry.message}", PLAIN
Expand Down
10 changes: 7 additions & 3 deletions maphide/qt/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,14 @@ Window {
id: drawer
width: 436
height: parent.height
x: win.drawerOpen ? parent.width - width : parent.width
visible: x < parent.width
// How far open, from 0 (hidden) to 1. The slide animates this,
// not x, so the window growing to its size as it first opens
// doesn't slide the drawer across it.
property real openness: win.drawerOpen ? 1 : 0
x: parent.width - width * openness
visible: openness > 0
color: win.t.bg
Behavior on x { NumberAnimation { duration: 340; easing.type: Easing.Bezier; easing.bezierCurve: [0.2, 0.9, 0.25, 1, 1, 1] } }
Behavior on openness { NumberAnimation { duration: 340; easing.type: Easing.Bezier; easing.bezierCurve: [0.2, 0.9, 0.25, 1, 1, 1] } }
Rectangle { width: 1; height: parent.height; color: win.t.border2 }
MouseArea { anchors.fill: parent }

Expand Down
157 changes: 132 additions & 25 deletions maphide/qt/Settings.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Shapes

// The settings drawer's contents: seven numbered sections, then Reset and
// The settings drawer's contents: numbered sections, then Reset and
// Save. Edits stay in the form, unapplied, until Save.
Item {
id: settings
Expand Down Expand Up @@ -425,6 +425,15 @@ Item {
checked: settings.f.log_enabled
onToggled: (on) => backend.setField("log_enabled", on)
}
Switch {
width: parent.width
visible: backend.updatesShown
divider: true
label: "Check for updates"
description: "Look for a new version when MapHide opens"
checked: settings.f.check_updates
onToggled: (on) => backend.setField("check_updates", on)
}
}
}
}
Expand Down Expand Up @@ -488,42 +497,140 @@ Item {

// 07 ABOUT
Column {
id: about
width: parent.width
spacing: 8
readonly property string phase: backend.updateState
readonly property bool found: backend.updateVersion !== ""
// What the button does now: "check", "install", "page", or ""
// while busy.
readonly property string action: !backend.updatesShown ? ""
: phase === "checking" || phase === "downloading" || phase === "installing" ? ""
: found && (phase === "available" || phase === "failed")
? (backend.canInstallUpdate ? "install" : "page")
: "check"
readonly property string status: ({
checking: "Checking GitHub for a newer version…",
latest: "You're on the latest version",
available: backend.canInstallUpdate
? "v" + backend.updateVersion + " is out. MapHide reopens after updating; settings stay."
: "v" + backend.updateVersion + " is out on GitHub.",
downloading: "Downloading v" + backend.updateVersion + "… " + backend.updatePercent + "%",
installing: "Installing. MapHide will open again.",
failed: backend.updateMessage
})[phase] || ""
// "You're on the latest version" shows for a moment, then the
// row goes back to normal.
Timer {
interval: 4000
running: about.phase === "latest"
onTriggered: backend.clearUpdateResult()
}
SectionHeading { number: "07"; title: "ABOUT" }
Rectangle {
width: parent.width
height: 54
height: Math.max(54, aboutText.height + 20)
color: settings.t.panel
border.color: settings.t.border
Row {
Image {
id: aboutLogo
x: 12
width: 28
height: 28
anchors.verticalCenter: parent.verticalCenter
source: backend.assets + "/MapHide_Icon_64.png"
mipmap: true
}
Column {
id: aboutText
anchors.left: aboutLogo.right
anchors.leftMargin: 12
anchors.right: updateButton.visible ? updateButton.left : parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
spacing: 12
Image {
width: 28
height: 28
anchors.verticalCenter: parent.verticalCenter
source: backend.assets + "/MapHide_Icon_64.png"
mipmap: true
spacing: 2
Mono { text: "MapHide " + backend.version; font.pixelSize: 13 }
Label {
width: parent.width
visible: about.status !== ""
text: about.status
wrapMode: Text.Wrap
font.pixelSize: 12
color: about.phase === "failed" ? settings.t.warn
: about.phase === "latest" ? settings.t.ok
: about.phase === "available" ? settings.t.accent_text
: settings.t.muted
}
Column {
anchors.verticalCenter: parent.verticalCenter
spacing: 2
Mono { text: "MapHide " + backend.version; font.pixelSize: 13 }
Label {
text: "github.com/ColorDumper/MapHide"
font.pixelSize: 12
font.underline: aboutLink.containsMouse
color: settings.t.accent_text
MouseArea {
id: aboutLink
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: Qt.openUrlExternally("https://github.com/ColorDumper/MapHide")
Label {
text: "github.com/ColorDumper/MapHide"
font.pixelSize: 12
font.underline: aboutLink.containsMouse
color: settings.t.accent_text
MouseArea {
id: aboutLink
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: Qt.openUrlExternally("https://github.com/ColorDumper/MapHide")
}
}
}
PressButton {
id: updateButton
objectName: "updateButton"
visible: backend.updatesShown
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
width: Math.max(118, updateButtonRow.width + 24)
height: 36
enabled: about.action !== ""
fill: about.action === "install" ? settings.t.accent : settings.t.panel2
edge: about.action === "install" ? settings.t.accent_deep : settings.t.border2
onClicked: {
if (about.action === "install")
backend.installUpdate()
else if (about.action === "page")
Qt.openUrlExternally(backend.releasesPage)
else if (about.action === "check")
backend.checkForUpdates()
}
Row {
id: updateButtonRow
anchors.centerIn: parent
spacing: 6
Spinner {
anchors.verticalCenter: parent.verticalCenter
visible: about.action === "" && backend.updatesShown
}
// A tick once MapHide is up to date.
Shape {
anchors.verticalCenter: parent.verticalCenter
visible: about.phase === "latest"
width: 13
height: 13
preferredRendererType: Shape.CurveRenderer
ShapePath {
strokeColor: settings.t.ok
strokeWidth: 2
fillColor: "transparent"
capStyle: ShapePath.RoundCap
joinStyle: ShapePath.RoundJoin
PathSvg { path: "M11 3.5 L5 10 L2 7" }
}
}
Condensed {
font.pixelSize: 14
font.letterSpacing: 14 * 0.08
color: about.action === "install" ? settings.t.on_accent : settings.t.text
text: about.action === "install"
? (about.phase === "failed" ? "TRY AGAIN" : "UPDATE")
: about.action === "page" ? "GET IT"
: about.phase === "checking" ? "CHECKING"
: about.action === "" ? "UPDATING"
: about.phase === "latest" ? "UP TO DATE"
: "CHECK FOR UPDATES"
}
}
}
}
Expand Down
Loading