Changeset View
Changeset View
Standalone View
Standalone View
app/viewmainpage.cpp
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Line(s) | 177 | { | |||
---|---|---|---|---|---|
184 | // Avoid dark and bright colors | 184 | // Avoid dark and bright colors | ||
185 | bgColor.setHsv(bgColor.hue(), bgColor.saturation(), (127 + 3 * bgColor.value()) / 4); | 185 | bgColor.setHsv(bgColor.hue(), bgColor.saturation(), (127 + 3 * bgColor.value()) / 4); | ||
186 | 186 | | |||
187 | QColor leftBorderColor = PaintUtils::adjustedHsv(bgColor, 0, 0, qMin(20, 255 - bgColor.value())); | 187 | QColor leftBorderColor = PaintUtils::adjustedHsv(bgColor, 0, 0, qMin(20, 255 - bgColor.value())); | ||
188 | QColor rightBorderColor = PaintUtils::adjustedHsv(bgColor, 0, 0, -qMin(40, bgColor.value())); | 188 | QColor rightBorderColor = PaintUtils::adjustedHsv(bgColor, 0, 0, -qMin(40, bgColor.value())); | ||
189 | QColor borderSelColor = PaintUtils::adjustedHsv(bgSelColor, 0, 0, -qMin(60, bgSelColor.value())); | 189 | QColor borderSelColor = PaintUtils::adjustedHsv(bgSelColor, 0, 0, -qMin(60, bgSelColor.value())); | ||
190 | 190 | | |||
191 | QString itemCss = | 191 | QString itemCss = | ||
192 | "QListView::item {" | 192 | "QListView::item:!hover {" | ||
193 | " background-color: %1;" | 193 | " background-color: %1;" | ||
194 | " border-left: 1px solid %2;" | 194 | " border-left: 1px solid %2;" | ||
195 | " border-right: 1px solid %3;" | 195 | " border-right: 1px solid %3;" | ||
196 | "}"; | 196 | "}"; | ||
197 | itemCss = itemCss.arg( | 197 | itemCss = itemCss.arg( | ||
198 | gradient(orientation, bgColor, 46), | 198 | gradient(orientation, bgColor, 46), | ||
199 | gradient(orientation, leftBorderColor, 36), | 199 | gradient(orientation, leftBorderColor, 36), | ||
200 | gradient(orientation, rightBorderColor, 26)); | 200 | gradient(orientation, rightBorderColor, 26)); | ||
▲ Show 20 Lines • Show All 614 Lines • Show Last 20 Lines |