Skip to content

Commit

Permalink
fix: border color of QPdfView
Browse files Browse the repository at this point in the history
  • Loading branch information
ffiirree committed Nov 16, 2024
1 parent 3346029 commit df0dc50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/capturer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ void Capturer::PreviewMimeData(const std::shared_ptr<QMimeData>& mimedata)
mimedata->setData(clipboard::MIME_TYPE_STATUS, "P");
}
else if (mimedata->hasUrls() && mimedata->urls().size() == 1 && mimedata->urls()[0].isLocalFile() &&
QFileInfo(mimedata->urls()[0].toLocalFile()).isFile() &&
QFileInfo(mimedata->urls()[0].fileName()).suffix().toLower() == "pdf") {
QFileInfo(mimedata->urls()[0].toLocalFile()).isFile() &&
QFileInfo(mimedata->urls()[0].fileName()).suffix().toLower() == "pdf") {

preview = new PdfViewer(mimedata);
mimedata->setData(clipboard::MIME_TYPE_STATUS, "P");
Expand Down Expand Up @@ -218,10 +218,11 @@ void Capturer::OpenSettingsDialog()
void Capturer::QuickLook()
{
#if _WIN32
const auto actived = probe::graphics::active_window();
if (!actived || actived->pname != "explorer.exe") return;
const auto active = probe::graphics::active_window();
if (!active || active->pname != "explorer.exe") return;

const auto file = probe::graphics::explorer_focused(actived->handle);
// FIXME: maybe without extensions
const auto file = probe::graphics::explorer_focused(active->handle);

if (file.empty()) return;

Expand Down
5 changes: 3 additions & 2 deletions src/resources/stylesheets/capturer.qss
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,9 @@ Message#message QLabel {

/*///////////////////////////////////////////////////////////////*/
QPdfView {
border: 0;
border-top: 1px solid #1E1E1E;
border-left: 0;
border-right: 0;
border-bottom: 0;
}

PdfViewer TitleBar QPushButton#icon {
Expand Down

0 comments on commit df0dc50

Please sign in to comment.