Extract app status planning into app core
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "node_dialog_picker.h"
|
||||
#include "node_panel_floating.h"
|
||||
#include "app_core/app_preferences.h"
|
||||
#include "app_core/app_status.h"
|
||||
#include "settings.h"
|
||||
#include "serializer.h"
|
||||
#include "font.h"
|
||||
@@ -17,12 +18,19 @@
|
||||
|
||||
void App::title_update()
|
||||
{
|
||||
static char str[256];
|
||||
snprintf(str, 256, "Panodoc: %s%s (%s)", doc_name.c_str(), canvas->m_canvas->m_unsaved ? "*" : "", res_to_string(canvas->m_canvas->m_width).c_str());
|
||||
if (auto docname = layout[main_id]->find<NodeText>("txt-docname"))
|
||||
docname->set_text(str);
|
||||
{
|
||||
const auto title = pp::app::make_document_title(
|
||||
doc_name,
|
||||
canvas->m_canvas->m_unsaved,
|
||||
canvas->m_canvas->m_width);
|
||||
docname->set_text(title.c_str());
|
||||
}
|
||||
if (auto node = layout[main_id]->find<NodeText>("txt-dpi"))
|
||||
node->set_text(fmt::format("{:.1f}x-dpi", zoom).c_str());
|
||||
{
|
||||
const auto label = pp::app::make_dpi_label(zoom);
|
||||
node->set_text(label.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void App::init_toolbar_main()
|
||||
|
||||
Reference in New Issue
Block a user