Commit graph

132 commits

Author SHA1 Message Date
Dave Davenport
e116aa5bc1 [Textbox|FileBrowser] Fix crash on invalid filename
Try to fix some crash on invalid filenames.

Issue: #1471
2021-09-22 15:45:02 +02:00
Dave Davenport
c10ee955bd
#1437 - Fix sizing logic for widgets and textboxes. (#1444)
* [I1437] Textbox make get_desired_width depend on width.

Should fix some weird sizing issues on creation of widgest.


* [i1437] [View] Do the sizing based on the desired window width.

issue: #1437

* [i1437] Fix header documentation.
2021-09-07 19:40:07 +02:00
Dave Davenport
f4e5fd328a Revert "[I1437] Textbox make get_desired_width depend on width."
This reverts commit 154e03efc1.
2021-09-06 22:47:35 +02:00
Dave Davenport
154e03efc1 [I1437] Textbox make get_desired_width depend on width.
Should fix some weird sizing issues on creation of widgest.

Issue: #1437
2021-09-06 22:36:21 +02:00
Dave Davenport
c64565e877 [CppCheck] Fix some shadowing variables. 2021-08-21 01:08:40 +02:00
Dave Davenport
954fc728b2 [Cleanup] Using clang-tidy 2021-08-18 01:16:45 +02:00
Dave Davenport
9d85bcb914 Update copyright header. 2021-06-09 14:50:39 +02:00
Dave Davenport
3b297ee80d Re-indent the code using indenter. 2021-06-01 10:44:23 +02:00
Dave Davenport
f69f8fcb7b Cleanup code documentation. 2021-05-05 21:53:29 +02:00
Dave Davenport
9dd54ac6c6 [Textbox] Allow markup to be disabled in theme.
Change textbox for message from textbox to message-textbox.

Issue: #1255
2021-01-19 23:55:07 +01:00
Dave Davenport
9313d7a8a0 [Textbox] Allow theme to force markup enabled on textbox.
rofi -theme-str 'prompt { markup: true; }' -show drun -display-drun '<i>d</i>ru<b>n</b>'

fixes: #1220
2020-12-28 22:45:58 +01:00
Dave Davenport
af6752c35d [Textbox] When estimating height, set correct font first.
fixes: #1247
2020-12-27 21:25:06 +01:00
Dave Davenport
7061eb21ae Indent round. 2020-11-03 23:57:02 +01:00
Dave Davenport
31fc5c9d35 [Textbox] Try to fix estimated font height.
This was on newer pango 1 pixel off with actual font height.
This casues drawing issues.

Fixes: #1190
2020-09-13 10:24:59 +02:00
Dave Davenport
30735791b4 Run indenter. 2020-08-28 16:41:59 +02:00
nick87720z
e275ed2283
Again final workaround for #303 (#1142) 2020-06-09 17:17:50 +02:00
nick87720z
8a2e67f6fe
workaround for #303 (#1122)
* workaround for #303

Subpixel rendering may be disabled by some clip paths or when text
itself is clipped.

* optimize draw_pango_layout()
2020-05-12 12:05:56 +02:00
Dave Davenport
8be08007f8 [Textbox] Round estimated size up. 2020-03-31 14:05:12 +02:00
Dave Davenport
ca067234ff [Textbox|Listview] Fix sizing of textbox.
- don't get height of layout, but calculate height using metrics.
- listview, set string with right number of lines.

Issue: #925, #1069
2020-03-29 16:31:47 +02:00
Dave Davenport
b169289996 Indent all the code. 2020-02-02 13:56:37 +01:00
Dave Davenport
25402f44eb [Textbox] Correctly fall back to content when str is empty. 2020-01-02 16:37:24 +01:00
Dave Davenport
b4b85b2a71 [Textbox] Don't use placeholder color for cursor. 2020-01-02 13:42:14 +01:00
Dave Davenport
b03edc5cf3 Update copyright dates. 2020-01-01 12:23:12 +01:00
Dave Davenport
f3bb043df0 [Textbox] Add placeholder.
Fixes: #1020
2019-12-26 14:24:10 +01:00
Dave Davenport
e9dde8e2ac [Doc] Update rofi-theme documentation.
allow `content` as alias to `str` on textbox.
2019-12-14 10:59:10 +01:00
Dave Davenport
74f7a48c4f [Textbox] Add theme option to stop blinking. 2019-11-03 11:31:08 +01:00
Dave Davenport
8d9e403659 Update copyright. 2019-09-27 11:58:32 +02:00
Dave Davenport
618d1396ee
Issue949 (#999)
* [Issue 949] Add initial split of listview row into widget tree.

Allowing better themeing.

* Remove unneeded code from textbox. allow dis. icons.

* Fix typo.

* Fix wrong widget offset in textbox.

* Fix mouse handling

* [ListView] Add 'fixed-columns' boolean option.

* [Listview] Fix inversion of option.

* [ListView] remove commented old code.

* [Textbox] Handle null pointer on desired width.

* [Listview] Fix crasher with fixed_columns and more max elements requested items.

* Add hack to get backwards compatibility for new listview structure.

* Fix the scrollbar test.

* Fix tests for theme update..
2019-08-08 20:02:20 +02:00
Dave Davenport
52c5592a6f [ListView|Textbox] Add user-settable ellipsize mode.
Fixes: #917
2019-05-04 11:04:54 +02:00
Dave Davenport
5b83b2ed23 Allow aligning icon 2019-03-24 10:31:13 +01:00
Maxim Baz
ff9b0f5ccd Add default shortcuts: Shift+BackSpace to delete previous char, Ctrl+Left/Right for word movements (#790)
* Support Shift+BackSpace by default to delete previous char

* Support Ctrl+Arrow for word movements
2018-06-13 14:15:31 +02:00
Dave Davenport
32b45c2d10 Fix documentation
* theme
* view
* textbox
2018-06-12 12:16:33 +02:00
Dave Davenport
2da5e5ee55 [TextBox] Add a reference to the cairo surface when displaying an icon. 2018-05-12 10:40:15 +02:00
Edward Betts
79adae77d7 Correct spelling mistakes. (#722) 2017-11-23 18:41:52 +01:00
Dave Davenport
9ae62960c1 Indent files. 2017-10-05 17:45:50 +02:00
Dave Davenport
0596f7c1a1 Correctly center and scale image, even if not rectangular 2017-09-21 19:27:04 +02:00
Dave Davenport
acfc07a63e Fix Inherit keyword 2017-09-07 13:46:09 +02:00
Dave Davenport
72f050e2fc Move enabled into widget. 2017-09-07 08:52:30 +02:00
Dave Davenport
2a5cb6f621 Alias 'color' property name to 'text-color' 2017-09-07 08:35:09 +02:00
Dave Davenport
6b43fed3aa use color, background-color and border-color 2017-09-06 19:02:09 +02:00
Dave Davenport
9b0a430fd4 Indent. 2017-09-05 13:52:44 +02:00
Dave Davenport
ba296f9210 Add ch as size unit. 2017-09-05 13:52:21 +02:00
Dave Davenport
508e39c3f3 Set cursor to end of input field.
Fixes: #662
2017-08-29 10:40:24 +02:00
Dave Davenport
ee9f5f71c1 [TextBox] Remove dead (commented code) 2017-06-26 20:14:31 +02:00
Dave Davenport
e28b038d62 Check user data dir when looking for theme.
- set default textbox color to black.
2017-06-22 08:54:29 +02:00
Dave Davenport
ad91f9a124 [TextBox] Calculate yalign based on actual side, not estimated size. 2017-06-08 08:46:16 +02:00
Dave Davenport
9fe67c1822 [TextBox] Remove TB_LEFT/CENTER/RIGHT replace with xalign/yalign. 2017-06-07 20:16:14 +02:00
Dave Davenport
07076d154a Load theme-str after loading fallback themes.
* If no theme loaded, try converting old theme.
 * If still no theme loaded, try default theme.
 * Then load modifications (theme-str option)
2017-06-07 07:53:33 +02:00
Dave Davenport
a399adfa38 [TextBox] Fix centering with large padding 2017-06-06 09:28:36 +02:00
Dave Davenport
27d1da76b1 [TextBox] Fix yalign for cursor and icon. 2017-06-06 09:09:57 +02:00