Commit Graph

46425 Commits

Author SHA1 Message Date
John Scipione
db85cbe0b5 MenuItem: Set and restore the low color too
A small revision on my last published commit, set and restore the
low color in addition to the high color when drawing the menu item
because DrawString() will produce nicer looking results if the low
color of the view matches the color it draws on due to anti-aliasing.
2013-08-20 16:50:05 -04:00
John Scipione
dec0a3523d MenuItem: Fix disabled sub-menu item color
See #6610 comment:15 for details.

Firstly, don't save and restore the super menu's low color
since it never changes, instead, save and restore the super
menu's high color which does get altered here.

Secondly, set the high color to
B_MENU_SELECTED_ITEM_TEXT_COLOR only if the menu item
is activated and enabled, otherwise set the high color by tinting the
background color which might be
B_MENU_SELECTED_BACKGROUND_COLOR or
B_MENU_BACKGROUND_COLOR depending on whether
the item is selected or not.

Thirdly, complete the TODO by using a lighten tint if the menu
has a dark background and vice-versa.

This third item is actually a good candidate for a BControlLook
function because the disabled tint should depend on whether the
background color of the thing you're disabling is light or dark.
2013-08-20 16:20:56 -04:00
John Scipione
6048f54145 Screen prefs: Use menu field layout methods
... to layout the menu field label and menu in the grid. This makes
the label and grid layout correctly, the AddMenuField() method should
be deprecated or fixed as it lays out the menu field differently.

Also replace numeric spacing units with font relative spacing units.
2013-08-20 14:43:16 -04:00
Jessica Hamilton
ffd71d3d19 MediaPlayer: revert hrev38440
With #6610 fixed, it is now possible to open disabled menus in a
menubar, so the workaround introduced in hrev33840 is no longer
needed.

Signed-off-by: John Scipione <jscipione@gmail.com>
2013-08-20 13:47:56 -04:00
Jerome Duval
a17e9da139 XHCI/UHCI USB: forgot to get the x86 PCI module. 2013-08-20 19:42:59 +02:00
Jerome Duval
c2cfbd70fe intel_extreme: add MSI support 2013-08-20 19:42:58 +02:00
John Scipione
83ea4af492 BMenu: Don't hit test separator items
Fixes #4147 while not causing the regression described in #6610
like hrev35248 did.
2013-08-20 13:34:14 -04:00
John Scipione
77850e8dba Revert "BMenu return only enabled items"
Patch by "stimut"

This reverts commit abc26ba8ad.

Reverting this patch fixes #6610
2013-08-20 13:30:31 -04:00
Jérôme Duval
d31b295e59 pci: check the bus number for pcie mechanism
* fallback to mechanism 1 for out of range bus numbers
* Support for the fallback is mandatory according to the PCIe specification.
* Should help with #9929 and #9930
2013-08-20 18:28:27 +02:00
John Scipione
b87ee2bfeb Keymap mod keys: Conflict if either left or right
... key doesn't match rather than requiring both left and right keys
to not match for a conflict.

Also update copyright year
2013-08-19 15:59:55 -04:00
John Scipione
460168d586 Keymap mod keys: Use menu field label and refactor
Use CreateLabelLayoutItem() instead of faking the label with a BStringView.
This is important because it means the label is part of the menu field control
rather than being it's own separate view.

Also convert from using deprecated BGroupLayoutBuilder and
BGridLayoutBuilder classes and use the BLayoutBuilder template instead.

Use font-relative spacing values instead of constants.

Make key label take up 2 columns

Make protected methods private, don't want to subclass
ModifierKeysWindow
2013-08-19 15:59:55 -04:00
John Scipione
c197198238 Keymap mod keys: style fixes 2013-08-19 15:59:54 -04:00
John Scipione
2388b04ab8 Keymap mod keys: Move ConflictView to top.
Also, move includes from .h to .cpp file.

Make _FillSavedIcon() private, make Draw() public.
2013-08-19 15:59:54 -04:00
Siarzhuk Zharski
222b10cbc0 USB audio: Fix building on x86_64
* fix x86_64 build errors and warnings pointed out by Diver;
* fix warning building with gcc2.
2013-08-19 21:18:59 +02:00
Stephan Aßmus
03891f74db HaikuDepot: Added Insert(TextSpan) to Paragraph 2013-08-18 17:53:06 +02:00
Stephan Aßmus
be42d7a9a3 HaikuDepot: Added more methods to List
* Add(ItemType, index) and Replace(ItemType, index)
2013-08-18 17:53:05 +02:00
Stephan Aßmus
00f2259aef HaikuDepot: TextSpan fixes for sometimes neglected fCharCount. 2013-08-18 17:53:04 +02:00
Stephan Aßmus
92d83d4edc HaikuDepot: Added Insert() and Remove() to TextSpan. 2013-08-18 17:53:03 +02:00
Stephan Aßmus
bbb3f9ac5e HaikuDepot: Package status should come from PackageManager
* But its unimplemented...
2013-08-18 17:53:02 +02:00
Stephan Aßmus
d4957a50ae HaikuDepot: Paragraph holds TextSpan objects 2013-08-18 17:53:01 +02:00
Stephan Aßmus
f1071521b3 HaikuDepot: Added TextSpan class 2013-08-18 17:53:00 +02:00
Stephan Aßmus
aa26b5f5f0 HaikuDepot: Added TextStyle convenience methods
* Empty constructor
 * Copy constructor
 * operator==(const TextStyle& other)
2013-08-18 17:53:00 +02:00
Stephan Aßmus
13e00959ac HaikuDepot: Pargraph data classes for TextView
* Added ParagraphStyleData. Contains actual style data. Incomplete.
   Supposed to be immutable,.
 * Added ParagraphStyle, references a ParagraphStyleData.
   Multiple ParagraphStyle object can refer to the same ParagrapgStyleData,
   when a style aspect is changed for ParagraphStyle, it makes its own
   copy of the previous ParagraphStyleData with the changed property.
 * Added Paragraph class, currently knows only its ParagraphStyle.
2013-08-18 17:52:59 +02:00
Stephan Aßmus
6eabc75c78 HaikuDepot: Vote up/down icons now clickable. Nothing happens. 2013-08-18 17:52:58 +02:00
Stephan Aßmus
bef5ba1ac3 HaikuDepot: BitmapButton fixes
* BitmapView can be configured to scale or not to
   scale the bitmap.
 * BitmapButton more or less completed.
2013-08-18 17:52:57 +02:00
Stephan Aßmus
ecbb2c1943 HaikuDepot: Moved BitmapView into its own source file
* Added BitmapButton, based on BitmapView, for clickable
   icons. Incomplete and untested.
2013-08-18 17:52:56 +02:00
Siarzhuk Zharski
a69892cadc Rename driver folder 'usb_audio' to 'usb'
... just because the source path ./kernel/drivers/audio/usb obviously
references audio hardware so "_audio" suffix is excessive.

No functional changes.
2013-08-18 14:49:59 +02:00
Siarzhuk Zharski
14f92002e1 USB audio: use new(std::nothrow) for allocations
* Use new(std::nothrow) for allocations;
* Input buffer index counter restored;
* Improve unsupported UI controls debug info tracing;
* Some cleanup.
2013-08-18 14:49:51 +02:00
Siarzhuk Zharski
743d75946f USB audio: Mixer Unit control implementation
* support of Mixer Unit control in UI implemented;
* improve SetMix/GetMix to support Mixer Unit control type;
* cleanup and improvements.
2013-08-18 14:49:44 +02:00
Siarzhuk Zharski
353a4e04d1 USB audio: Fix function of Selector Unit control
* restore function of Selector Unit that was previously disabled;
* fix Selector Unit input pin names "Unknwon" case.
2013-08-18 14:49:37 +02:00
Siarzhuk Zharski
a8066fe34a USB audio: dev.entry number should be 1-based, etc
* USB audio device entry number made 1-based instead of 0. According to
  Haiku MultiAudio specs audio device entries should be 1-based but
  0-based;
* cleanup and refactoring. No functional changes;
* recording stream activated;
* fix input channels description report and codestyle issues.
2013-08-18 14:49:22 +02:00
Siarzhuk Zharski
7ff9cd33a9 USB audio: Refactor TRACE-es for more configurability 2013-08-18 14:49:13 +02:00
Siarzhuk Zharski
1a6d941d1d USB audio: Use system-wide USB_audio.h instead local one
* switching driver code to use system usb/USB_audio.h header;
* refactor USB_audio.h specification header for both USB audio specifications.
2013-08-18 14:49:06 +02:00
Siarzhuk Zharski
b42544e71d USB audio: fInsideNotify guard added to Remote/Close callbacks 2013-08-18 14:48:51 +02:00
Siarzhuk Zharski
673ef2cbaf USB audio: cleanup and codestyle fixes.
* cleanup and codestyle fixes;
* AudioFunction module contents purged out as unused.
2013-08-18 14:48:42 +02:00
Siarzhuk Zharski
2cc4703b91 Fix and force USB audio driver to work with new OHCI module
* some functionality like recording temporarily disabled;
* set the endpoint speed call added;
* packet size hard-coded for 48kHz case;
* draft support for formats and sampling rate handling;
* implement sampling rate change on the fly;
* optimized using of starting frame;
* fix user_memory in buffer exchaqnge call;
* fix exchanged buffer recoriding processing;
* debug tweaks, fix current buffer switching;
* cleanup, cleanup, cleanup...
2013-08-18 14:48:11 +02:00
Siarzhuk Zharski
291e40c309 USB OHCI: Fix finalizing of STALL-ed control request transfers
In case control transfer is finished with STALL answer from device only
the setup TD is retired into the Done Queue but other TDs (data and
status) are left in the ED queue. HC set the endpoint halted - so we
process such endpoint regardless of it's non-empty queue.

PS: cleanup some trailing spaces.
2013-08-18 14:47:51 +02:00
Siarzhuk Zharski
cf58476ccc USB OHCI: Support for isochronous transfers
Finishing and refactoring the draft, initially implemented during April-May 2012

NOTE: startingFrameNumber returned to device contains the number of the
next free frame right after the last packed of submitted data. For more
details please Look into corresponding [haiku-development] discussion
started at 03 Jul 2013.

Partially fixes #1045.
2013-08-18 14:47:33 +02:00
Stephan Aßmus
883b8dd0b9 HaikuDepot: Show number of up and down votes per user rating 2013-08-18 11:00:41 +02:00
Matt Madia
c58fcc9888 Fix x86_64 build. Use B_PRId32 instead of ld.
Suggested by diver and augiedoggie. Thanks!
2013-08-17 17:28:05 -04:00
Matt Madia
bbadab8989 Automatic whitespace cleanup. No functional change. 2013-08-17 17:26:39 -04:00
Stephan Aßmus
057633446b HaikuDepot: Added ratings summary view 2013-08-17 13:33:57 +02:00
Stephan Aßmus
4f434bc67a HaikuDepot: Added up and down vote count to UserRating 2013-08-17 13:33:56 +02:00
John Scipione
74577830da ColorControl: Implement keyboard navigation
Implements enhancement described in #9819

This feature works pretty much as it did on BeOS R5.

When you focus on the color control, the border is drawn blue and
the dot on the red ramp draws as an outline to show that it is
selected. You can push the up and down arrow keys to navigate to the
previous and next ramps respectively and can push right and left to
increment and decrement the color value of the selected ramp.

Clicking on the control no longer gives it focus.

In BeOS the left and right arrows would increment and decriment by 5,
on Haiku they increment and decrement by 1, but, by holding down the
key for a second or so the increment value increases to 5 allowing for
both course and fine adjustments.

On a technical note I split the int32 fFocusedComponent member variable
into 2 int16 member variables, fFocusedRamp and fClickedRamp. I did this
because I needed an entra variable, and can't  change the size of the
class without using up another reserved member variable slot. int16
should be more than enough for these variables as they store an index to
the currently focused or clicked on ramp (0-3). Please someone chime in
if this is not okay for FBC in some condition I didn't think about.
2013-08-17 03:40:58 -04:00
Niels Sascha Reedijk
32af01e854 Update translations from Pootle 2013-08-17 06:13:56 +02:00
Stephan Aßmus
e8be78fe3d HaikuDepot: Corrected copyright on TextLayout.cpp.
* The char classification stuff and can_end_line() originate
   from the BTextView implementation. Maybe Oliver Tappe is the
   lonely author of that code, but I don't feel like tracking this
   down at the moment and it should eventually be merged anyway,
   if what I did here proves useful at all.
2013-08-14 23:11:28 +02:00
Stephan Aßmus
840cac7415 HaikuDepot: Fixed scroll range in ratings view
* Due to HasHeightForWidth TextViews, the MinSize() of
   the layout has a different meaning. The reliable source
   for the actual needed height of the layout seems to be the
   Frame().bottom of the last BLayoutItem.
2013-08-14 23:07:27 +02:00
Stephan Aßmus
139bc0df15 HaikuDepot: A round of bug fixes gets the TextView working 2013-08-14 23:07:26 +02:00
Stephan Aßmus
0f71004390 HaikuDepot: More work on custom TextView
* TextLayout produces some first visible results...
2013-08-14 23:07:25 +02:00
Stephan Aßmus
156881a46b HaikuDepot: Beginnings of new TextView
* BTextView isn't usable for what I have in mind
 * based on new TextLayout
 * completely non-functional, yet
2013-08-14 23:07:24 +02:00