~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 3

[PATCH] community/telegram-desktop: Added more-scale patch

Eloi Torrents <eloitor@disroot.org>
Details
Message ID
<20220513103452.25368-1-eloitor@disroot.org>
DKIM signature
missing
Download raw message
Patch: +21 -2
---
 community/telegram-desktop/APKBUILD         |  7 +++++--
 community/telegram-desktop/more-scale.patch | 16 ++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 community/telegram-desktop/more-scale.patch

diff --git a/community/telegram-desktop/APKBUILD b/community/telegram-desktop/APKBUILD
index 3e43834e39..70abd22743 100644
--- a/community/telegram-desktop/APKBUILD
+++ b/community/telegram-desktop/APKBUILD
@@ -2,13 +2,14 @@
# Contributor: Nulo <alpine@nulo.in>
# Contributor: Donoban <donoban@riseup.net>
# Contributor: psykose <alice@ayaya.dev>
# Contributor: Eloi <eloitor@disroot.org>
# Maintainer: Nulo <alpine@nulo.in>
pkgname=telegram-desktop
# NOTE: Keep in mind that seemingly normal releases may be pre-releases.
# Check GitHub to make sure:
# https://github.com/telegramdesktop/tdesktop/releases
pkgver=3.7.3
pkgrel=0
pkgrel=1
pkgdesc="Telegram Desktop messaging app"
options="!check" # no test suite
url="https://desktop.telegram.org/"
@@ -68,13 +69,14 @@ makedepends="
	meson
	"

# small-sizes.patch is for postmarketOS. It makes UI elements fit in small
# small-sizes.patch and more-scale.patch are for postmarketOS. It makes UI elements fit in small
# screens.

# telegram-desktop also assumes glibc, musl.patch fixes that.
source="
	https://github.com/telegramdesktop/tdesktop/releases/download/v$pkgver/tdesktop-$pkgver-full.tar.gz
	small-sizes.patch
	more-scale.patch
	add-libvpx.patch
	musl.patch
	"
@@ -100,6 +102,7 @@ package() {
sha512sums="
f35052e514d520796296fa88e3affa1734973164e4b72f0120b78fc586de98a15e64a4e25f436ee4c2c2c0e100c64b3dbd2d96401dff19c382a6ad1fde88e859  tdesktop-3.7.3-full.tar.gz
3d480d712c94d720ff68bd88bc2edd007581c24cb43b76801af736fa4dff9610d154a7d2128634d18e910d058228d337f17aaf51fb10a2e93e0a9c52558ead1a  small-sizes.patch
d32880f510c6510ffeffb0d4609327f00aceba889674e8a4b124568a563cce588d057003df14f0278c4311900416d698028c1229312f36127fc9d573ed3637f1  more-scale.patch
c6b77a52547dc45f91f89cdd014c09fe318c49d34e88c4093f206b42ea3e61781a9447dbb4096424a845a519e101242bcac789272e8815a04c1be908cd304c37  add-libvpx.patch
e86df3cbf09f11e9fd49c73a78da1ea385b23dd90bbc271fb858d25035fd9c8ad14985ca64b39e87c09c556c14aef9c6ec83931515e32bbe020bcdbf389cc39d  musl.patch
"
diff --git a/community/telegram-desktop/more-scale.patch b/community/telegram-desktop/more-scale.patch
new file mode 100644
index 0000000000..9422e3cb0b
--- /dev/null
+++ b/community/telegram-desktop/more-scale.patch
@@ -0,0 +1,16 @@
diff --git a/Telegram/SourceFiles/settings/settings_main.cpp b/Telegram/SourceFiles/settings/settings_main.cpp
index a40cb6f21..3b5dd885d 100644
--- a/Telegram/SourceFiles/settings/settings_main.cpp
+++ b/Telegram/SourceFiles/settings/settings_main.cpp
@@ -193,8 +193,8 @@ void SetupInterfaceScale(
 
 	static const auto ScaleValues = [&] {
 		auto values = (cIntRetinaFactor() > 1)
-			? std::vector<int>{ 100, 110, 120, 130, 140, 150 }
-			: std::vector<int>{ 100, 125, 150, 200, 250, 300 };
+			? std::vector<int>{ 80, 90, 100, 110, 120, 130, 140, 150 }
+			: std::vector<int>{ 50, 75, 100, 125, 150, 200, 250, 300 };
 		if (cConfigScale() == style::kScaleAuto) {
 			return values;
 		}

-- 
2.36.1
Details
Message ID
<165248794753.985.13236697769255694696.gitlab.34367.631ead8411b4fd6502b6c602f6eeb7568b6b2f22@listserv.local>
In-Reply-To
<20220513103452.25368-1-eloitor@disroot.org> (view parent)
DKIM signature
missing
Download raw message
On Fri, 13 May 2022 12:34:52 +0200, Eloi Torrents wrote:
>  
> -# small-sizes.patch is for postmarketOS. It makes UI elements fit in small
> +# small-sizes.patch and more-scale.patch are for postmarketOS. It makes UI elements fit in small

Describe the new patch better, e.g. explain that it adds more scale points.

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/34367#note_236112
Details
Message ID
<165248794798.985.5880292173224955745.gitlab.34367.054bcc8acb757aa5be6ec9bbbc631c7256f2ecea@listserv.local>
In-Reply-To
<20220513103452.25368-1-eloitor@disroot.org> (view parent)
DKIM signature
missing
Download raw message
On Fri, 13 May 2022 12:34:52 +0200, Eloi Torrents wrote:
> +-			: std::vector<int>{ 100, 125, 150, 200, 250, 300 };
> ++			? std::vector<int>{ 80, 90, 100, 110, 120, 130, 140, 150 }
> ++			: std::vector<int>{ 50, 75, 100, 125, 150, 200, 250, 300 };

I'm not sure about this. This means adding more scaling values than what Telegram expects which can break in weird ways. Can't this be applied directly in postmarketOS? I'm not familiar with their processes.

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/34367#note_236113
Details
Message ID
<165249660099.985.6181467520026748129.gitlab.34367.054bcc8acb757aa5be6ec9bbbc631c7256f2ecea@listserv.local>
In-Reply-To
<165248794798.985.5880292173224955745.gitlab.34367.054bcc8acb757aa5be6ec9bbbc631c7256f2ecea@listserv.local> (view parent)
DKIM signature
missing
Download raw message
On Fri, 13 May 2022 12:34:52 +0200, Eloi Torrents wrote:
> +-			: std::vector<int>{ 100, 125, 150, 200, 250, 300 };
> ++			? std::vector<int>{ 80, 90, 100, 110, 120, 130, 140, 150 }
> ++			: std::vector<int>{ 50, 75, 100, 125, 150, 200, 250, 300 };

if a pmOS user wants to set scaling smaller than 100, they can just use `-scale 75` and, for example, set it in the .desktop file:
https://github.com/telegramdesktop/tdesktop/blob/69e41e/Telegram/SourceFiles/core/launcher.cpp#L530

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/34367#note_236119
Details
Message ID
<165250624948.985.6339698775406978925.gitlab.34367.054bcc8acb757aa5be6ec9bbbc631c7256f2ecea@listserv.local>
In-Reply-To
<165249660099.985.6181467520026748129.gitlab.34367.054bcc8acb757aa5be6ec9bbbc631c7256f2ecea@listserv.local> (view parent)
DKIM signature
missing
Download raw message
On Fri, 13 May 2022 12:34:52 +0200, Eloi Torrents wrote:
> +-			: std::vector<int>{ 100, 125, 150, 200, 250, 300 };
> ++			? std::vector<int>{ 80, 90, 100, 110, 120, 130, 140, 150 }
> ++			: std::vector<int>{ 50, 75, 100, 125, 150, 200, 250, 300 };

I didnt know about that, but is is nice to be able to change the scale interactively. With this patch the default scale is not changed, only 2 extra values under it are added.

This does not break anything, I have been using telegram in archarm this way for two months without noticing it was a patched version. I wanted to use Pmos, but telegram not fitting the screen was a deal breaker.

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/34367#note_236135
Details
Message ID
<165250643614.985.3492050822968878485.gitlab.34367.631ead8411b4fd6502b6c602f6eeb7568b6b2f22@listserv.local>
In-Reply-To
<165248794753.985.13236697769255694696.gitlab.34367.631ead8411b4fd6502b6c602f6eeb7568b6b2f22@listserv.local> (view parent)
DKIM signature
missing
Download raw message
On Fri, 13 May 2022 12:34:52 +0200, Eloi Torrents wrote:
>  
> -# small-sizes.patch is for postmarketOS. It makes UI elements fit in small
> +# small-sizes.patch and more-scale.patch are for postmarketOS. It makes UI elements fit in small

more-scale.patch adds two scale points below the default.

Is this OK?

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/34367#note_236136
Reply to thread Export thread (mbox)