Skip to content

armgit / WacOS

Public Imported from GitHub
0

A new style desktop shell for Windows 11: menu bar, Dock, Finder, Spotlight, Control Center and Liquid Glass, in native C++.

Rust

Merge pull request #355

Eternity07062877223b19028b
diff --cc src/shell/dock.cpp
index 4f0138c,ae4581c..e432b84
--- a/src/shell/dock.cpp
+++ b/src/shell/dock.cpp
@@@ -1093,13 -1175,13 +1176,13 @@@ void CALLBACK FgEvent(HWINEVENTHOOK, DW
// A etiqueta com o nome (pt, na janela dos ícones, sempre em pé): embaixo, acima do ícone com a setinha para baixo;
// dos lados, ao lado do ícone com a setinha apontando para ele (como no Mac com o Dock à esquerda ou à direita).
-struct LabelBox { D2D1_RECT_F r{}; D2D1_POINT_2F tri[3]{}; D2D1_POINT_2F in{}; std::wstring t; }; // in: da base da setinha para a ponta
+struct LabelBox { D2D1_RECT_F r{}; D2D1_POINT_2F tri[3]{}; std::wstring t; };
bool LabelGeom(int lab, LabelBox& L) {
- if (!g_rotulos || lab < 0 || lab >= (int)g_items.size() || g_items[lab].kind == I_SEP || g_reveal <= 0.9f) return false;
- auto& it = g_items[lab];
+ if (!g_rotulos || lab < 0 || lab >= (int)View().items.size() || View().items[lab].kind == I_SEP || View().reveal <= 0.9f) return false;
+ auto& it = View().items[lab];
L.t = Label(it);
float tw = ui::TextWidth(g_tfLabel, L.t) + 22, th = 26;
- float baseline = g_bg.top + PAD_TOP + g_tile;
+ float baseline = View().bg.top + PAD_TOP + View().tile;
if (!Vert()) {
float top = baseline - it.size - 14 - th;
L.r = { it.cx - tw / 2, top, it.cx + tw / 2, top + th };