Add title bar color sync with app theme on Windows#163
Conversation
Implements platform channel to sync the native window title bar color with the app's theme mode. When the user switches between light and dark themes, the title bar automatically updates to match. Changes: - Add MethodChannel 'com.extera.app/window' in Dart for theme-related native calls - Implement SetTitleBarColor() in Windows native code using DwmSetWindowAttribute - Sync title bar brightness in real-time when app theme changes - Only applies on Windows platform
|
бро , а скрины где? |
|
|
||
| RECT frame = GetClientArea(); | ||
|
|
||
| // The size here must match the window dimensions to avoid unnecessary surface |
There was a problem hiding this comment.
зачем коменты апстрима удалять ?
верни на место
There was a problem hiding this comment.
зачем коменты апстрима удалять ? верни на место
Навайбкодил
There was a problem hiding this comment.
ну их вернуть надо везде типа
| void FlutterWindow::SetupChannelHandlers() { | ||
| auto channel = | ||
| std::make_unique<flutter::MethodChannel<flutter::EncodableValue>>( | ||
| flutter_controller_->engine()->messenger(), "com.extera.app/window", |
There was a problem hiding this comment.
| flutter_controller_->engine()->messenger(), "com.extera.app/window", | |
| flutter_controller_->engine()->messenger(), "xyz.extera.extera/window", |
|
|
||
| #include "win32_window.h" | ||
|
|
||
| // A window that does nothing but host a Flutter view. |
Co-authored-by: meoovv <296894618+meoovv@users.noreply.github.com>
|
it's xyz.extera.next, not xyz.extera.extera |
|
@ryotairi are you sure ? xyz.extera.extera is the most widely used in codebase rn and last time this topic was raised in matrix room, there wasnt clear feedback from you 🫠 ps. not to mention, wip flatpak build is using this id, too ! |
| builder: (context, child) => AppLockWidget( | ||
| pincode: widget.pincode, | ||
| clients: widget.clients, | ||
| // Need a navigator above the Matrix widget for |
There was a problem hiding this comment.
эти 2 комента тоже надо бы, пропустила сначала
| flutter_controller_->engine()->messenger(), "xyz.extera.next/window", | ||
| &flutter::StandardMethodCodec::GetInstance()); | ||
|
|
||
| channel->SetMethodCallHandler( |
There was a problem hiding this comment.
мне кажется тут чтото странное/неэффективное начинает происходить, но я цпп не знаю так что норм.


Навайбкодил синхронизацию цвета заголовка окна с темой приложения для Windows. При переключении между светлой и тёмной темами оформление окна меняется автоматически
Pull Request has been tested on: