<commit_before>#include <QtGlobal>
#include <QtWidgets>
#include <QDesktopServices>
#include <QStringList>
#include <QHBoxLayout>

#include "seafile-applet.h"
#include "account-mgr.h"
#include "utils/utils.h"
#include "utils/paint-utils.h"
#include "utils/file-utils.h"
#include "api/api-error.h"
#include "file-table.h"
#include "seaf-dirent.h"
#include "ui/loading-view.h"
#include "data-mgr.h"
#include "data-mgr.h"
#include "progress-dialog.h"
#include "tasks.h"
#include "ui/set-repo-password-dialog.h"
#include "sharedlink-dialog.h"
#include "seafilelink-dialog.h"
#include "uploadlink-dialog.h"
#include "auto-update-mgr.h"
#include "transfer-mgr.h"
#include "repo-service.h"
#include "rpc/local-repo.h"
#include "rpc/rpc-client.h"
#include "ui/private-share-dialog.h"
#include "ui/logout-view.h"

#include "file-browser-manager.h"
#include "file-browser-dialog.h"

#include "ui/download-repo-dialog.h"

#include "QtAwesome.h"

namespace {

enum {
    INDEX_LOADING_VIEW = 0,
    INDEX_TABLE_VIEW,
    INDEX_LOADING_FAILED_VIEW,
    INDEX_EMPTY_VIEW,
    INDEX_RELOGIN_VIEW,
    INDEX_SEARCH_VIEW
};

const char *kLoadingFailedLabelName = "LoadingFailedText";
const int kToolBarIconSize = 24;
const int kStatusBarIconSize = 20;
const int kAllPage = 1;
const int kPerPageCount = 10000;
const int kSearchBarWidth = 250;
//const int kStatusCodePasswordNeeded = 400;

void openFile(const QString& path)
{
    ::openInNativeExtension(path) || ::showInGraphicalShell(path);
#ifdef Q_OS_MAC<commit_msg>Fix dpi scaling issues (#1424)<commit_after>#include <QtGlobal>
#include <QtWidgets>
#include <QDesktopServices>
#include <QStringList>
#include <QHBoxLayout>

#include "seafile-applet.h"
#include "account-mgr.h"
#include "utils/utils.h"
#include "utils/paint-utils.h"
#include "utils/file-utils.h"
#include "api/api-error.h"
#include "file-table.h"
#include "seaf-dirent.h"
#include "ui/loading-view.h"
#include "data-mgr.h"
#include "data-mgr.h"
#include "progress-dialog.h"
#include "tasks.h"
#include "ui/set-repo-password-dialog.h"
#include "sharedlink-dialog.h"
#include "seafilelink-dialog.h"
#include "uploadlink-dialog.h"
#include "auto-update-mgr.h"
#include "transfer-mgr.h"
#include "repo-service.h"
#include "rpc/local-repo.h"
#include "rpc/rpc-client.h"
#include "ui/private-share-dialog.h"
#include "ui/logout-view.h"

#include "file-browser-manager.h"
#include "file-browser-dialog.h"

#include "ui/download-repo-dialog.h"

#include "QtAwesome.h"

namespace {

enum {
    INDEX_LOADING_VIEW = 0,
    INDEX_TABLE_VIEW,
    INDEX_LOADING_FAILED_VIEW,
    INDEX_EMPTY_VIEW,
    INDEX_RELOGIN_VIEW,
    INDEX_SEARCH_VIEW
};

const char *kLoadingFailedLabelName = "LoadingFailedText";
const int kToolBarIconSize = 24;
const int kStatusBarIconSize = 20;
const int kAllPage = 1;
const int kPerPageCount = 10000;
const int kSearchBarWidth = 250;
//const int kStatusCodePasswordNeeded = <PASSWORD>;

void openFile(const QString& path)
{
#if defined(Q_OS_WIN32)
    // The QT_SCREEN_SCALE_FACTORS environment variable will be passed to the
    // application invoked from here, which may cause scaling problems.
    // So we temporary reset that and restore back.
    const char *factors = g_getenv("QT_SCREEN_SCALE_FACTORS");
    g_setenv("QT_SCREEN_SCALE_FACTORS", "1", 1);
#endif

    ::openInNativeExtension(path) || ::showInGraphicalShell(path);

#if defined(Q_OS_WIN32)
    g_setenv("QT_SCREEN_SCALE_FACTORS", factors, 1);
#endif

#ifdef Q_OS_MAC
{'fraction_non_alphanumeric': 0.13901734104046243, 'fraction_numerical': 0.012138728323699421, 'mean_word_length': 5.292727272727273, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2258612', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1302, 'n_words': 267}