image viewer popup when clicking an image in a message
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
Green Sky
2025-03-17 22:52:31 +01:00
parent 10ad2be8bf
commit 90a28d727b
7 changed files with 425 additions and 312 deletions

View File

@@ -201,7 +201,8 @@ ChatGui4::ChatGui4(
_msg_tc(msg_tc),
_b_tc(_bil, tu),
_theme(theme),
_sip(tu)
_sip(tu),
_ivp(_msg_tc)
{
_os_sr.subscribe(ObjectStore_Event::object_update);
}
@@ -220,6 +221,7 @@ ChatGui4::~ChatGui4(void) {
float ChatGui4::render(float time_delta, bool window_hidden, bool window_focused) {
_fss.render();
_sip.render(time_delta);
_ivp.render(time_delta);
_b_tc.update();
_b_tc.workLoadQueue();
@@ -1330,7 +1332,9 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
{0.5f, 0.5f, 0.5f, 0.8f} // border
);
// TODO: clickable to open in internal image viewer
if (ImGui::IsItemClicked()) {
_ivp.view(Message3Handle{reg, e});
}
}
} else if (o.all_of<ObjComp::F::SingleInfo>()) { // only show info if not inlined image
// just filename