Zoom in instead of out on :active to prevent mouseup in areas close to border from being lost

This commit is contained in:
Kovid Goyal 2015-11-07 15:52:45 +05:30
parent a45645c32a
commit 899d358e5c
3 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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