Skip to content

Commit

Permalink
Merge branch 'main' into lenemter/fix-crash-on-tile
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 authored Dec 11, 2024
2 parents 135d64d + 903bc3f commit 20516dc
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 130 deletions.
8 changes: 3 additions & 5 deletions po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: noise\n"
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
"POT-Creation-Date: 2024-11-23 16:06+0000\n"
"PO-Revision-Date: 2024-10-03 23:16+0000\n"
"PO-Revision-Date: 2024-12-08 11:16+0000\n"
"Last-Translator: TomiOhl <[email protected]>\n"
"Language-Team: Hungarian <https://l10n.elementary.io/projects/desktop/gala/"
"hu/>\n"
Expand All @@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"
"X-Generator: Weblate 5.8.4\n"
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"

#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
Expand Down Expand Up @@ -125,10 +125,8 @@ msgid "Updated translations"
msgstr "Frissített fordítások"

#: data/gala.metainfo.xml.in:35
#, fuzzy
#| msgid "Improve window shadows for legacy apps"
msgid "Improved shadows performance"
msgstr "Az elavult alkalmazások ablakának árnyéka javítva"
msgstr "Árnyékok teljesítménye javítva"

#: data/gala.metainfo.xml.in:78
msgid "Fix a potential crash when moving windows between workspaces"
Expand Down
17 changes: 10 additions & 7 deletions po/lv.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ msgstr ""
"Project-Id-Version: noise\n"
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
"POT-Creation-Date: 2024-11-23 16:06+0000\n"
"PO-Revision-Date: 2014-06-28 01:54+0000\n"
"Last-Translator: Matiss Treinis <[email protected]>\n"
"Language-Team: Latvian <[email protected]>\n"
"PO-Revision-Date: 2024-12-08 11:16+0000\n"
"Last-Translator: Jānis Greiškāns <[email protected]>\n"
"Language-Team: Latvian <https://l10n.elementary.io/projects/desktop/gala/lv/>"
"\n"
"Language: lv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n % 10 == 0 || n % 100 >= 11 && n % 100 <= "
"19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2);\n"
"X-Generator: Weblate 5.8.4\n"
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
"X-Generator: Launchpad (build 18326)\n"

#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
msgid "Change Wallpaper…"
Expand Down Expand Up @@ -251,15 +254,15 @@ msgstr[1] ""

#: src/WindowManager.vala:2362
msgid "Keep new display settings?"
msgstr ""
msgstr "Paturēt displeja izmaiņas?"

#: src/WindowManager.vala:2366
msgid "Keep Settings"
msgstr ""
msgstr "Paturēt Iestatījumus"

#: src/WindowManager.vala:2367
msgid "Use Previous Settings"
msgstr ""
msgstr "Lietot Iepriekšējos Iestatījumus"

#. / TRANSLATORS: %s represents a timestamp here
#: src/WindowManager.vala:2406
Expand Down
12 changes: 6 additions & 6 deletions po/zh_TW.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
"POT-Creation-Date: 2024-11-23 16:06+0000\n"
"PO-Revision-Date: 2024-11-06 11:20+0000\n"
"PO-Revision-Date: 2024-12-09 11:10+0000\n"
"Last-Translator: Kisaragi Hiu <[email protected]>\n"
"Language-Team: Chinese (Traditional) <https://l10n.elementary.io/projects/"
"desktop/gala/zh_Hant/>\n"
"Language-Team: Chinese (Traditional Han script) <https://l10n.elementary.io/"
"projects/desktop/gala/zh_Hant/>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 5.6.2\n"
"X-Generator: Weblate 5.8.4\n"
"X-Launchpad-Export-Date: 2017-02-21 05:48+0000\n"

#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
Expand All @@ -34,7 +34,7 @@ msgstr "系統設定值…"

#: daemon/DBus.vala:207 daemon-gtk3/BackgroundMenu.vala:47
msgid "Failed to open System Settings"
msgstr "開啟系統設定失敗了"
msgstr "無法開啟《系統設定值》"

#: daemon/DBus.vala:208 daemon-gtk3/BackgroundMenu.vala:48
msgid "A handler for the “settings://” URI scheme must be installed."
Expand Down Expand Up @@ -123,7 +123,7 @@ msgstr "更新翻譯"

#: data/gala.metainfo.xml.in:35
msgid "Improved shadows performance"
msgstr ""
msgstr "改善陰影效能"

#: data/gala.metainfo.xml.in:78
msgid "Fix a potential crash when moving windows between workspaces"
Expand Down
8 changes: 8 additions & 0 deletions src/InternalUtils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -340,5 +340,13 @@ namespace Gala {
return { 0, 0, (int) screen_width, (int) screen_height };
}
}

public static Clutter.ActorBox actor_box_from_rect (float x, float y, float width, float height) {
var actor_box = Clutter.ActorBox ();
actor_box.init_rect (x, y, width, height);
Clutter.ActorBox.clamp_to_pixel (ref actor_box);

return actor_box;
}
}
}
23 changes: 0 additions & 23 deletions src/Widgets/Tooltip.vala
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ public class Gala.Tooltip : CanvasActor {
*/
private Clutter.Text text_actor;

/**
* Maximum width of the Tooltip.
* @see set_max_width
*/
public float max_width;

construct {
max_width = 200;

#if HAS_MUTTER47
Cogl.Color text_color = {
#else
Expand Down Expand Up @@ -51,21 +43,6 @@ public class Gala.Tooltip : CanvasActor {
text_actor.text = new_text;
}

public void set_max_width (float new_max_width) {
max_width = new_max_width;

queue_relayout ();
}

protected override void allocate (Clutter.ActorBox box) {
if (box.get_width () > max_width) {
box.set_origin (box.get_x () + ((box.get_width () - max_width) / 2), box.get_y ());
box.set_size (max_width, box.get_height ());
}

base.allocate (box);
}

protected override void draw (Cairo.Context ctx, int width, int height) {
ctx.save ();
ctx.set_operator (Cairo.Operator.CLEAR);
Expand Down
Loading

0 comments on commit 20516dc

Please sign in to comment.