Application: use ImGui::BeginTooltip() correctly.
This commit is contained in:
parent
cd5213a3f9
commit
387647669f
2 changed files with 2 additions and 4 deletions
|
@ -402,8 +402,7 @@ Application::drawHelpMarker(Containers::StringView text, float wrap_pos) {
|
||||||
|
|
||||||
void
|
void
|
||||||
Application::drawTooltip(Containers::StringView text, float wrap_pos) {
|
Application::drawTooltip(Containers::StringView text, float wrap_pos) {
|
||||||
if(ImGui::IsItemHovered()){
|
if(ImGui::IsItemHovered() && ImGui::BeginTooltip()) {
|
||||||
ImGui::BeginTooltip();
|
|
||||||
if(wrap_pos > 0.0f) {
|
if(wrap_pos > 0.0f) {
|
||||||
ImGui::PushTextWrapPos(wrap_pos);
|
ImGui::PushTextWrapPos(wrap_pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,8 +267,7 @@ Application::drawBackupListPopup() {
|
||||||
|
|
||||||
ImGui::TableSetColumnIndex(0);
|
ImGui::TableSetColumnIndex(0);
|
||||||
ImGui::TextUnformatted(backup.company.cbegin(), backup.company.cend());
|
ImGui::TextUnformatted(backup.company.cbegin(), backup.company.cend());
|
||||||
if(ImGui::IsItemHovered()) {
|
if(ImGui::IsItemHovered() && ImGui::BeginTooltip()) {
|
||||||
ImGui::BeginTooltip();
|
|
||||||
for(const auto& file : backup.includedFiles) {
|
for(const auto& file : backup.includedFiles) {
|
||||||
ImGui::TextUnformatted(file.cbegin());
|
ImGui::TextUnformatted(file.cbegin());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue