mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Zoom in instead of out on :active to prevent mouseup in areas close to border from being lost
This commit is contained in:
parent
a45645c32a
commit
899d358e5c
@ -25,8 +25,8 @@ class TopBar:
|
||||
sel, display='inline-block', vertical_align='middle', overflow='hidden', cursor='pointer',
|
||||
color=get_color('bar-foreground'), background='none', padding_top=self.VSPACING, padding_bottom=self.VSPACING
|
||||
)
|
||||
style += build_rule(sel + ':hover', color=get_color('bar-background'), background_color=get_color('bar-foreground'))
|
||||
style += build_rule(sel + ':active', transform='scale(0.6)')
|
||||
style += build_rule(sel + ':hover', transform='scale(1.5)')
|
||||
style += build_rule(sel + ':active', transform='scale(2)')
|
||||
style += build_rule(sel + ':focus', outline='none')
|
||||
for bid in self.dummy_bar_id, self.bar_id:
|
||||
bar = E.div(
|
||||
|
@ -23,7 +23,7 @@ class BooksView:
|
||||
self.metadata_map = interface_data['metadata']
|
||||
self.container_id = 'books-view-' + bv_counter
|
||||
style = build_rule('#' + self.container_id + ' .cover_grid img:hover', transform='scale(1.2)')
|
||||
style += build_rule('#' + self.container_id + ' .cover_grid img:active', transform='scale(0.8)')
|
||||
style += build_rule('#' + self.container_id + ' .cover_grid img:active', transform='scale(2.0)')
|
||||
div = E.div(
|
||||
id=self.container_id, style='display:block',
|
||||
E.style(style),
|
||||
|
@ -22,8 +22,9 @@ create_button.style = build_rule('button.calibre-push-button',
|
||||
padding='1ex 1em', color=get_color('button-text'), cursor='pointer', font_size='inherit'
|
||||
)
|
||||
create_button.style += build_rule('button.calibre-push-button:hover', transform='scale(1.2)')
|
||||
create_button.style += build_rule('button.calibre-push-button:active', transform='scale(0.8)')
|
||||
create_button.style += build_rule('button.calibre-push-button:active', transform='scale(2)')
|
||||
create_button.style += build_rule('button.calibre-push-button:focus', outline='none')
|
||||
create_button.style += build_rule('button.calibre-push-button::-moz-focus-inner', border='0')
|
||||
|
||||
def get_widget_css():
|
||||
ans = create_button.style
|
||||
|
Loading…
x
Reference in New Issue
Block a user