new grid view style in MacOSX

This commit is contained in:
Luis Ángel San Martín
2014-11-05 23:17:11 +01:00
parent 91a3ff7063
commit 03618254a3
3 changed files with 11 additions and 16 deletions

View File

@ -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);

View File

@ -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

View File

@ -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];