mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 15:04:40 -04:00
new grid view style in MacOSX
This commit is contained in:
@ -65,16 +65,20 @@ void GridComicsView::setModel(ComicModel *model)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
ctxt->setContextProperty("backgroundColor", "#EDEDED");
|
ctxt->setContextProperty("backgroundColor", "#F5F5F5");
|
||||||
ctxt->setContextProperty("cellColor", "#FFFFFF");
|
ctxt->setContextProperty("cellColor", "#FFFFFF");
|
||||||
ctxt->setContextProperty("selectedColor", "#DDDDDD");
|
ctxt->setContextProperty("selectedColor", "#FFFFFF");
|
||||||
|
ctxt->setContextProperty("selectedBorderColor", "#007AFF");
|
||||||
|
ctxt->setContextProperty("borderColor", "#DBDBDB");
|
||||||
ctxt->setContextProperty("titleColor", "#121212");
|
ctxt->setContextProperty("titleColor", "#121212");
|
||||||
ctxt->setContextProperty("textColor", "#636363");
|
ctxt->setContextProperty("textColor", "#636363");
|
||||||
ctxt->setContextProperty("dropShadow",true);
|
|
||||||
#else
|
#else
|
||||||
ctxt->setContextProperty("backgroundColor", "#2A2A2A");
|
ctxt->setContextProperty("backgroundColor", "#2A2A2A");
|
||||||
ctxt->setContextProperty("cellColor", "#212121");
|
ctxt->setContextProperty("cellColor", "#212121");
|
||||||
ctxt->setContextProperty("selectedColor", "#121212");
|
ctxt->setContextProperty("selectedColor", "#121212");
|
||||||
|
ctxt->setContextProperty("selectedBorderColor", "#121212");
|
||||||
|
ctxt->setContextProperty("borderColor", "#121212");
|
||||||
ctxt->setContextProperty("titleColor", "#E6E6E6");
|
ctxt->setContextProperty("titleColor", "#E6E6E6");
|
||||||
ctxt->setContextProperty("textColor", "#E6E6E6");
|
ctxt->setContextProperty("textColor", "#E6E6E6");
|
||||||
ctxt->setContextProperty("dropShadow",false);
|
ctxt->setContextProperty("dropShadow",false);
|
||||||
|
@ -49,6 +49,8 @@ Rectangle {
|
|||||||
|
|
||||||
width: 156; height: 287
|
width: 156; height: 287
|
||||||
color: ((dummyValue || !dummyValue) && comicsSelectionHelper.isSelectedIndex(index)) || grid.currentIndex === index?selectedColor:cellColor;
|
color: ((dummyValue || !dummyValue) && comicsSelectionHelper.isSelectedIndex(index)) || grid.currentIndex === index?selectedColor:cellColor;
|
||||||
|
border.color: ((dummyValue || !dummyValue) && comicsSelectionHelper.isSelectedIndex(index)) || grid.currentIndex === index?selectedBorderColor:borderColor;
|
||||||
|
border.width: (Qt.platform.os === "osx")?1:0;
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
@ -127,19 +129,6 @@ Rectangle {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DropShadow {
|
|
||||||
anchors.fill: source
|
|
||||||
horizontalOffset: 0
|
|
||||||
verticalOffset: 0
|
|
||||||
radius: 3
|
|
||||||
samples: 24
|
|
||||||
color: "#40000000"
|
|
||||||
transparentBorder: true;
|
|
||||||
source: realCell;
|
|
||||||
enabled: dropShadow;
|
|
||||||
visible: dropShadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
//cover
|
//cover
|
||||||
|
@ -260,6 +260,8 @@ YACReaderMacOSXSearchLineEdit::YACReaderMacOSXSearchLineEdit()
|
|||||||
NSTextField * searchEdit = [[NSSearchField alloc] initWithFrame:searchEditFrameRect];
|
NSTextField * searchEdit = [[NSSearchField alloc] initWithFrame:searchEditFrameRect];
|
||||||
//[searchEdit setBezelStyle:NSTextFieldRoundedBezel];
|
//[searchEdit setBezelStyle:NSTextFieldRoundedBezel];
|
||||||
|
|
||||||
|
[[searchEdit cell] setPlaceholderString:@"type to search"];
|
||||||
|
|
||||||
MyTextFieldDelegate * delegate = [[MyTextFieldDelegate alloc] init];
|
MyTextFieldDelegate * delegate = [[MyTextFieldDelegate alloc] init];
|
||||||
delegate->mylineedit = this;
|
delegate->mylineedit = this;
|
||||||
[searchEdit setDelegate:delegate];
|
[searchEdit setDelegate:delegate];
|
||||||
|
Reference in New Issue
Block a user