From 899d358e5cf17aec8cc11747c8cac9b6f4681bb9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 7 Nov 2015 15:52:45 +0530 Subject: [PATCH] Zoom in instead of out on :active to prevent mouseup in areas close to border from being lost --- src/pyj/book_list/top_bar.pyj | 4 ++-- src/pyj/book_list/views.pyj | 2 +- src/pyj/widgets.pyj | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pyj/book_list/top_bar.pyj b/src/pyj/book_list/top_bar.pyj index 35bbeb5c90..17cab0b4ed 100644 --- a/src/pyj/book_list/top_bar.pyj +++ b/src/pyj/book_list/top_bar.pyj @@ -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( diff --git a/src/pyj/book_list/views.pyj b/src/pyj/book_list/views.pyj index 816d9349f4..3bf851f28c 100644 --- a/src/pyj/book_list/views.pyj +++ b/src/pyj/book_list/views.pyj @@ -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), diff --git a/src/pyj/widgets.pyj b/src/pyj/widgets.pyj index 5bb292653a..fd5bb9e93f 100644 --- a/src/pyj/widgets.pyj +++ b/src/pyj/widgets.pyj @@ -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