save on exit message, * symbol on unsaved docs, saved status on history

This commit is contained in:
2018-07-31 17:25:50 +02:00
parent 5a37f578cb
commit 1a7677a727
10 changed files with 43 additions and 21 deletions

View File

@@ -11,10 +11,10 @@ using namespace ui;
static glm::vec4 color_button_normal{ .1, .1, .1, 1 };
static glm::vec4 color_button_hlight{ 1, .0, .0, 1 };
void App::title_update(std::string name, int resolution)
void App::title_update()
{
static char str[256];
snprintf(str, 256, "Panodoc: %s%s (%dpx)", doc_name.c_str(), canvas->m_canvas->m_unsaved ? "*" : "", resolution);
snprintf(str, 256, "Panodoc: %s%s (%dpx)", doc_name.c_str(), canvas->m_canvas->m_unsaved ? "*" : "", canvas->m_canvas->m_width);
if (auto docname = layout[main_id]->find<NodeText>("txt-docname"))
docname->set_text(str);
}