Skip to content

Commit

Permalink
Change Windows macro
Browse files Browse the repository at this point in the history
- Use #ifdef instead of #if for __WIN32, as it is not defined on macOS and gives warnings.
  • Loading branch information
aaronhktan committed Jan 24, 2019
1 parent 71ec132 commit 84426f8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/jyut-dict/components/entryheaderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ EntryHeaderWidget::EntryHeaderWidget(QWidget *parent) : QWidget(parent)
_wordLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
_wordLabel->setWordWrap(true);
_wordLabel->setStyleSheet("QLabel { font-size: 24px}");
#if __WIN32
#ifdef __WIN32
_wordLabel->setFont(QFont("MingLiU"));
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/jyut-dict/components/mainsplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MainSplitter::MainSplitter(QWidget *parent) : QSplitter(parent)
{ \
background-color: rgb(0, 0, 0); \
}");
#elif __WIN32__
#elif __WIN32
setStyleSheet("QSplitter::handle \
{ \
background-color: #b9b9b9; \
Expand Down
2 changes: 1 addition & 1 deletion src/jyut-dict/components/maintoolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MainToolBar::MainToolBar(QWidget *parent) : QToolBar(parent)
setMovable(false);
setFloatable(false);

#if __WIN32
#ifdef __WIN32
setStyleSheet("QToolBar { background-color: white; }");
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/jyut-dict/components/searchlistview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SearchListView::SearchListView(QWidget *parent)
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
}

#if __WIN32
#ifdef __WIN32
void SearchListView::wheelEvent(QWheelEvent *event)
{
int singleStep = verticalScrollBar()->singleStep();
Expand Down
2 changes: 1 addition & 1 deletion src/jyut-dict/components/searchlistview.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SearchListView : public QListView
public:
explicit SearchListView(QWidget *parent = nullptr);

#if __WIN32
#ifdef __WIN32
void wheelEvent(QWheelEvent *event) override;
#endif

Expand Down

0 comments on commit 84426f8

Please sign in to comment.